> i agree with that - the underscore that was used is also valid. you
> might look at proper quoting of variables to avoid this. something
> like cat text.txt | sed -e 's/bbb.*/:"$PWD"/' > new.txt
The output from that, given Joao's original text.txt, is
:"$PWD"
The reason is t
On Fri, Mar 18, 2011 at 7:05 PM, Dr. Ed Morbius wrote:
> on 19:08 Fri 18 Mar, Joao Ferreira gmail (joao.miguel.c.ferre...@gmail.com)
> wrote:
> > On Fri, 2011-03-18 at 18:59 +0100, Andrej Kacian wrote:
> > > On Fri, 18 Mar 2011 17:46:04 +
> > > Joao Ferreira gmail wrote:
>
>
Please note that
on 19:08 Fri 18 Mar, Joao Ferreira gmail (joao.miguel.c.ferre...@gmail.com)
wrote:
> On Fri, 2011-03-18 at 18:59 +0100, Andrej Kacian wrote:
> > On Fri, 18 Mar 2011 17:46:04 +
> > Joao Ferreira gmail wrote:
> >
> > >jmf@squeeje:~$ sed s/.*/:$PWD/ text.txt
> > >sed: -e expression #1,
On Fri, 2011-03-18 at 18:59 +0100, Andrej Kacian wrote:
> On Fri, 18 Mar 2011 17:46:04 +
> Joao Ferreira gmail wrote:
>
> >jmf@squeeje:~$ sed s/.*/:$PWD/ text.txt
> >sed: -e expression #1, char 16: unknown option to `s'
>
> Hello,
>
> this is because $PWD gets expanded by shell befo
On 2011-03-18 12:59:08 Andrej Kacian wrote:
>To get result you want, try using different separator character than /, for
>example the comma, or underscore:
Colon is also a pretty good choice. While it is allowed in pathnames, it
already causes problems. Try adding a directory containing colon t
On Fri, 18 Mar 2011 17:46:04 +
Joao Ferreira gmail wrote:
>jmf@squeeje:~$ sed s/.*/:$PWD/ text.txt
>sed: -e expression #1, char 16: unknown option to `s'
Hello,
this is because $PWD gets expanded by shell before sed gets called, so what
actually gets executed is:
sed s/bbb.*/:/
Hello all
I need to use sed to replace a given line in a text file with the
current working directory. But this is getting quite tricky. Problem
ilustrated below:
$ cat text.txt
:/some/wrong/path/
$ sed s/.*/:$TERM/ text.txt
:x
On Thu, Jan 08, 2009 at 12:03:38PM +0200, Micha Feigin wrote:
> I'm trying to fix the file suffix on some file in my directories using sed and
> find but for some reason sed doesn't match the string in this manner, that is
> running
> find . -name "*.JPG.jpg" -execdir echo `echo '{}' | sed -e
> 's
On Thu, 08 Jan 2009 11:24:27 +0100
Sven Joachim wrote:
> On 2009-01-08 11:03 +0100, Micha Feigin wrote:
>
> > I'm trying to fix the file suffix on some file in my directories using sed
> > and find but for some reason sed doesn't match the string in this manner,
> > that is running
> > find . -n
Bob Cox schrieb:
On Thu, Jan 08, 2009 at 12:03:38 +0200, Micha Feigin (mi...@post.tau.ac.il) wrote:
find . -type f -exec echo `echo '{}' | tr "[:upper:]" "[:lower:]"` \;
also fails to convert the file to lower case for some reason (same problem,
doesn't change the case, as if it doesn't see th
On Thu, Jan 08, 2009 at 12:03:38 +0200, Micha Feigin (mi...@post.tau.ac.il)
wrote:
> I'm trying to fix the file suffix on some file in my directories using sed and
> find but for some reason sed doesn't match the string in this manner, that is
> running
> find . -name "*.JPG.jpg" -execdir echo `
On Thu, Jan 08, 2009 at 12:03:38 +0200, Micha Feigin (mi...@post.tau.ac.il)
wrote:
> find . -type f -exec echo `echo '{}' | tr "[:upper:]" "[:lower:]"` \;
>
> also fails to convert the file to lower case for some reason (same problem,
> doesn't change the case, as if it doesn't see the characte
On 2009-01-08 11:03 +0100, Micha Feigin wrote:
> I'm trying to fix the file suffix on some file in my directories using sed and
> find but for some reason sed doesn't match the string in this manner, that is
> running
> find . -name "*.JPG.jpg" -execdir echo `echo '{}' | sed -e
> 's/\(.*\).JPG.jp
I'm trying to fix the file suffix on some file in my directories using sed and
find but for some reason sed doesn't match the string in this manner, that is
running
find . -name "*.JPG.jpg" -execdir echo `echo '{}' | sed -e
's/\(.*\).JPG.jpg/\1.jpg/' -` \;
on a directory with
2005_10_09-03_05_11.J
On Mon, Oct 20, 2003 at 10:09:47PM +0100, Dave selby wrote:
> >I need to get the contents of a HTML title tag & put it in a string.
> >
> >ie
> >specialist cards
> >
> >I need the "specialist cards" in a variable $titlecontents
> >I thought it would be easy with sed
> >
> >sed -n '//,/<\/title>/p'
Dave selby wrote:
I need to get the contents of a HTML title tag & put it in a string.
ie
specialist cards
I need the "specialist cards" in a variable $titlecontents
I thought it would be easy with sed
sed -n '//,/<\/title>/p'
But no go. I have tried various ways but to no avail.
Any ideas ?
On Sun, Oct 19, 2003 at 11:37:44AM +0100, Dave selby wrote:
> I need to get the contents of a HTML title tag & put it in a string.
>
> ie
> specialist cards
>
> I need the "specialist cards" in a variable $titlecontents
> I thought it would be easy with sed
>
> sed -n '//,/<\/title>/p'
>
> But
Dave selby <[EMAIL PROTECTED]> [2003:10:19:11:37:44+0100] scribed:
> I need to get the contents of a HTML title tag & put it in a string.
>
> ie
> specialist cards
>
> I need the "specialist cards" in a variable $titlecontents
> I thought it would be easy with sed
>
> sed -n '//,/<\/title>/p'
>
On Sun, 19 Oct 2003 11:37:44 +0100, Dave selby wrote:
> I need to get the contents of a HTML title tag & put it in a string.
>
> ie
> specialist cards
>
> I need the "specialist cards" in a variable $titlecontents I thought it
> would be easy with sed
>
> sed -n '//,/<\/title>/p'
>
> But no g
On Sun, Oct 19, 2003 at 11:37:44AM +0100, Dave selby wrote:
> I need to get the contents of a HTML title tag & put it in a string.
>
> ie
> specialist cards
>
> I need the "specialist cards" in a variable $titlecontents
> I thought it would be easy with sed
>
> sed -n '//,/<\/title>/p'
>
> But
I need to get the contents of a HTML title tag & put it in a string.
ie
specialist cards
I need the "specialist cards" in a variable $titlecontents
I thought it would be easy with sed
sed -n '//,/<\/title>/p'
But no go. I have tried various ways but to no avail.
Any ideas ?
Dave
--
To UNSUBSC
> Oliver Elphick <[EMAIL PROTECTED]> [2003-10-06 14:09]:
>
> On Mon, 2003-10-06 at 12:31, Lukas Ruf wrote:
>
> You are trying to use a Perl regular expression with sed; that doesn't
> work. Although the sed manpage refers to perlre, sed does not seem to
> support Perl regular expressions. You sh
On Mon, 2003-10-06 at 12:31, Lukas Ruf wrote:
> Dear all,
>
> although I know it isn't anything that directly refers to Debian, I
> dare to post since I have seen many similar questions. Please excuse!
It's not off topic for debian-user.
> The Problem: from a friend, I receive text-files that h
Dear all,
although I know it isn't anything that directly refers to Debian, I
dare to post since I have seen many similar questions. Please excuse!
The Problem: from a friend, I receive text-files that have a lot of
whitespace before the end of a line or even lines consisting of only
whitespace.
Im may be trying to push SED to far, in which case perl has been
suggested, but here is my problem ...
For a series of html pages, I need to take the text from the title tag
and insert it where there is a xx in the document, deleting the xx. Ie
use a template, fill in the title & let SED do the
Bijan Soleymani wrote:
On Sat, Oct 04, 2003 at 07:25:32PM +0100, Dave selby wrote:
I have multiple html files. I need to remove the same chunk of code from
all of them.
I have made a bash loop to feed the files to sed, but am struggling with
the sed code.
I need to delete all the code betwee
Michael D Schleif wrote:
Michael D Schleif <[EMAIL PROTECTED]> [2003:10:04:16:32:37-0500] scribed:
Dave selby <[EMAIL PROTECTED]> [2003:10:04:19:25:32+0100] scribed:
I have multiple html files. I need to remove the same chunk of code from
all of them.
I have made a bash loop to feed the f
Michael D Schleif <[EMAIL PROTECTED]> [2003:10:04:16:32:37-0500] scribed:
> Dave selby <[EMAIL PROTECTED]> [2003:10:04:19:25:32+0100] scribed:
> > I have multiple html files. I need to remove the same chunk of code from
> > all of them.
> > I have made a bash loop to feed the files to sed, but am
Dave selby <[EMAIL PROTECTED]> [2003:10:04:19:25:32+0100] scribed:
> I have multiple html files. I need to remove the same chunk of code from
> all of them.
> I have made a bash loop to feed the files to sed, but am struggling with
> the sed code.
>
> I need to delete all the code between
>
>
On Sat, Oct 04, 2003 at 07:25:32PM +0100, Dave selby wrote:
> I have multiple html files. I need to remove the same chunk of code from
> all of them.
> I have made a bash loop to feed the files to sed, but am struggling with
> the sed code.
>
>
> I need to delete all the code between
>
>
>
>
I have multiple html files. I need to remove the same chunk of code from
all of them.
I have made a bash loop to feed the files to sed, but am struggling with
the sed code.
I need to delete all the code between
and
Including the above comments.
I have tried, played with N, d substitution to
31 matches
Mail list logo