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 that
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
On Fri, 18 Mar 2011 17:46:04 +
Joao Ferreira gmail joao.miguel.c.ferre...@gmail.com 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
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 to
On Fri, 2011-03-18 at 18:59 +0100, Andrej Kacian wrote:
On Fri, 18 Mar 2011 17:46:04 +
Joao Ferreira gmail joao.miguel.c.ferre...@gmail.com wrote:
jmf@squeeje:~$ sed s/.*/:$PWD/ text.txt
sed: -e expression #1, char 16: unknown option to `s'
Hello,
this is because $PWD gets
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 joao.miguel.c.ferre...@gmail.com wrote:
jmf@squeeje:~$ sed s/.*/:$PWD/ text.txt
On Fri, Mar 18, 2011 at 7:05 PM, Dr. Ed Morbius dredmorb...@gmail.comwrote:
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
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
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
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 characters).
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 `echo
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 the
On Thu, 08 Jan 2009 11:24:27 +0100
Sven Joachim svenj...@gmx.de 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
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
Hi,
Ich muß eine Nummer aus folgendem String extrahieren:
wenn du viele solche Sachen machen musst, lohnt sich für dich vielleicht ein
Blick auf Perl!
zB:
--- extract.pl ---
#!/usr/bin/perl
while()
{
if ( m/\(([\d\/\-]+)\)/ )
{
print $1;
print
Am Mi 07.09.2005 11:38 schrieb Moritz Karbach [EMAIL PROTECTED]:
Hallo,
Ich muß eine Nummer aus folgendem String extrahieren:
wenn du viele solche Sachen machen musst, lohnt sich für dich
vielleicht ein
Blick auf Perl!
--- extract.pl ---
#!/usr/bin/perl
while()
{
if ( m/(([d/-]+))/ )
Hallo zusammen,
nachdem ihr mir beim letzten sed-Problem geholfen habt und alles soweit
funktioniert habe ich nun ein weiteres das ich mit dem Wissen des 1.
leider nicht alleine hin bekomme. Ich weiß nicht ob es mit sed überhaubt
funktioniert.
Ich muß eine Nummer aus folgendem String extrahieren
* Sven Gehr [EMAIL PROTECTED] [050906 09:56]:
Ich muß eine Nummer aus folgendem String extrahieren:
381 470 M (@# )[92 50 25 0]xS
573 470 M (0621/48293-91)[50 50 50 50 28 50 50 50 50 50 33 50 0]xS
1184 470 M ( #@)[25 50 0]xS
Die Nummer die ich daraus brauche ist die
Am Mi 31.08.2005 15:27 schrieb Frank Küster [EMAIL PROTECTED]:
Michelle Konzack [EMAIL PROTECTED] wrote:
Am 2005-08-31 12:55:18, schrieb Sven Gehr:
Hallo zusammen,
bin auf ein weiteres Problem mit meinem Skript (sed) gestoßen welches
absolut komisch ist, zumindest für mich.
Ausgangsmaterial
Am 2005-09-01 10:03:02, schrieb Sven Gehr:
also alles perfekt. Nun muß ich die zwei Schritte zu einem
zusammenfassen und habe folgendes Skript erstellt:
#!/bin/sh
PS2ASCII=/usr/bin/ps2ascii
FAXFILE=/usr/lib/cups/backend/out.ps
FAXNUM=`($PS2ASCII $FAXFILE)|sed -e 's/[EMAIL PROTECTED]//' -e
Am Do 01.09.2005 11:06 schrieb Michelle Konzack
[EMAIL PROTECTED]:
Am 2005-09-01 10:03:02, schrieb Sven Gehr:
also alles perfekt. Nun muß ich die zwei Schritte zu einem
zusammenfassen und habe folgendes Skript erstellt:
#!/bin/sh
PS2ASCII=/usr/bin/ps2ascii
Hallo,
Am Thu, 01 Sep 2005, Sven Gehr schrieb:
Am Mi 31.08.2005 15:27 schrieb Frank Küster [EMAIL PROTECTED]:
Michelle Konzack [EMAIL PROTECTED] wrote:
Am 2005-08-31 12:55:18, schrieb Sven Gehr:
[..]
also alles perfekt. Nun muß ich die zwei Schritte zu einem
zusammenfassen und habe folgendes
Hallo zusammen,
ich habe ein Problem mit sed. Die Problemstellung ist wie folgt:
In einem Textfile stehen an einer nicht exakt definierten Position ein
String der mit @@ beginnt und mit @@ endet. Der Teil der zwischen diesen
@@'s steht soll extrahiert werden und unformatiert werden. Beim
Sven Gehr [EMAIL PROTECTED] wrote:
2.) Nachdem ein evtl. vorhandenes + Zeichen am Anfang umgesetzt ist
sollen alle Zeichen die keine Zahl sind (Leerzeichen, /, - etc.)
entfernt werden.
Ich bin nicht unbedingt der sed-Profi. Was ich bisher hinbekommen habe
ist:
sed -r
Am Mittwoch 31 August 2005 09:41 schrieb Sven Gehr:
[sed-Wunsch]
echo @@+49621 4829/399@@bla bla bla|sed . erhalte ich:
00496214829399bla bla bla
Also wenn nichts gegen mehrere Ausdrücke spricht probier doch mal:
's/.*@@([EMAIL PROTECTED])@@.*/\1/g'
's/\s*+/00/'
's/[^0-9]//g'
also z.B.
Am 2005-08-31 09:41:13, schrieb Sven Gehr:
Hallo zusammen,
ich habe ein Problem mit sed. Die Problemstellung ist wie folgt:
blubber
sed -r
's/@@\s*?\+([0-9]+)\s*?([0-9]+)[^0-9]*?([0-9]+)\/?([0-9]+)?@@/00\1\2\3\4/g'
Mache ich ein:
echo @@+49621 4829/399@@bla bla bla|sed . erhalte
Am 2005-08-31 11:23:33, schrieb Christian Frommeyer:
Also wenn nichts gegen mehrere Ausdrücke spricht probier doch mal:
's/.*@@([EMAIL PROTECTED])@@.*/\1/g'
's/\s*+/00/'
's/[^0-9]//g'
also z.B. mit
sed -r -e 's/.*@@([EMAIL PROTECTED])@@.*/\1/g' -e 's/\s*+/00/' -e
's/[^0-9]//g'
Das
Michelle Konzack [EMAIL PROTECTED] wrote:
Am 2005-08-31 11:23:33, schrieb Christian Frommeyer:
sed -r -e 's/.*@@([EMAIL PROTECTED])@@.*/\1/g' -e 's/\s*+/00/' -e
's/[^0-9]//g'
Das ist aber nicht gut...
Besser:
sed -r -e 's/.*@@([EMAIL PROTECTED])@@.*/\1/g;s/\s*+/00/;s/[^0-9]//g'
Rein
On Wednesday 31 August 2005 09:41, Sven Gehr wrote:
Hallo zusammen,
ich habe ein Problem mit sed. Die Problemstellung ist wie folgt:
In einem Textfile stehen an einer nicht exakt definierten Position ein
String der mit @@ beginnt und mit @@ endet. Der Teil der zwischen diesen
@@'s steht
Am 2005-08-31 11:52:03, schrieb Mario 'BitKoenig' Holbe:
Michelle Konzack [EMAIL PROTECTED] wrote:
Am 2005-08-31 11:23:33, schrieb Christian Frommeyer:
sed -r -e 's/.*@@([EMAIL PROTECTED])@@.*/\1/g' -e 's/\s*+/00/' -e
's/[^0-9]//g'
Das ist aber nicht gut...
Besser:
sed -r -e
Am Mi 31.08.2005 11:26 schrieb Michelle Konzack
[EMAIL PROTECTED]:
Am 2005-08-31 09:41:13, schrieb Sven Gehr:
Vielen Dank für die Vorschläge. In der zwischenzeit habe ich viel mit
sed herum probiert und habe noch einiges geändert. Die Zeichen die den
Anfang und das Ende markieren kann ich ja
Am Mi 31.08.2005 12:55 schrieb Sven Gehr [EMAIL PROTECTED]:
Hallo,
[...]
Nun wollte ich das Ganze in ein Skript einbauen und habe so meine
Probleme damit.
#!/bin/sh
FAXFILE=/usr/lib/cups/backend/doc155.txt
FAXNUME=$FAXFILE|sed -e 's/[EMAIL PROTECTED]//' -e 's/[EMAIL PROTECTED]//' -e
's/
Am 2005-08-31 12:55:18, schrieb Sven Gehr:
Nun wollte ich das Ganze in ein Skript einbauen und habe so meine
Probleme damit.
#!/bin/sh
FAXFILE=/usr/lib/cups/backend/doc155.txt
FAXNUME=$FAXFILE|sed -e 's/[EMAIL PROTECTED]//' -e 's/[EMAIL PROTECTED]//' -e
's/ //g' -e
's/^+49/0/' -e
On 31.Aug 2005 - 14:18:00, Michelle Konzack wrote:
Am 2005-08-31 12:55:18, schrieb Sven Gehr:
Nun wollte ich das Ganze in ein Skript einbauen und habe so meine
Probleme damit.
#!/bin/sh
FAXFILE=/usr/lib/cups/backend/doc155.txt
FAXNUME=$FAXFILE|sed -e 's/[EMAIL PROTECTED]//' -e
Michelle Konzack [EMAIL PROTECTED] wrote:
Am 2005-08-31 12:55:18, schrieb Sven Gehr:
Nun wollte ich das Ganze in ein Skript einbauen und habe so meine
Probleme damit.
#!/bin/sh
FAXFILE=/usr/lib/cups/backend/doc155.txt
FAXNUME=$FAXFILE|sed -e 's/[EMAIL PROTECTED]//' -e 's/[EMAIL
Hallo,
Am Wed, 31 Aug 2005, Michelle Konzack schrieb:
Am 2005-08-31 11:52:03, schrieb Mario 'BitKoenig' Holbe:
Michelle Konzack [EMAIL PROTECTED] wrote:
Am 2005-08-31 11:23:33, schrieb Christian Frommeyer:
sed -r -e 's/.*@@([EMAIL PROTECTED])@@.*/\1/g' -e 's/\s*+/00/' -e
's/[^0-9]//g'
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
titlespecialist cards/title
I need the specialist cards in a variable $titlecontents
I thought it would be easy with sed
sed -n '/title/,/\/title/p'
sed
Dave selby wrote:
I need to get the contents of a HTML title tag put it in a string.
ie
titlespecialist cards/title
I need the specialist cards in a variable $titlecontents
I thought it would be easy with sed
sed -n '/title/,/\/title/p'
But no go. I have tried various ways but to no avail.
I need to get the contents of a HTML title tag put it in a string.
ie
titlespecialist cards/title
I need the specialist cards in a variable $titlecontents
I thought it would be easy with sed
sed -n '/title/,/\/title/p'
But no go. I have tried various ways but to no avail.
Any ideas ?
Dave
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
titlespecialist cards/title
I need the specialist cards in a variable $titlecontents
I thought it would be easy with sed
sed -n '/title/,/\/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
titlespecialist cards/title
I need the specialist cards in a variable $titlecontents I thought it
would be easy with sed
sed -n '/title/,/\/title/p'
But no
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
titlespecialist cards/title
I need the specialist cards in a variable $titlecontents
I thought it would be easy with sed
sed -n '/title/,/\/title/p'
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
titlespecialist cards/title
I need the specialist cards in a variable $titlecontents
I thought it would be easy with sed
sed -n '/title/,/\/title/p'
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
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 have
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 should
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
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
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
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
!-- lockon:a:1
--
and
!-- lockoff
--
Including the above comments.
I have tried,
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
!--
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
!--
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 struggling
Hallo Andre,
Am 21:46 2002-12-17 +0100 hat Andre Fischer geschrieben:
hallöchen,
ich glaub mein sed kann nicht mehr zählen :(
ich möchte die Zahlenfolge 12345 durch PLZ ersetzen und habe folgenden
Test gemacht:
echo test 12345 test | sed s/[0-9]\{5\}/PLZ/g
und habe folgendes Ergebnis erwartet:
hallöchen,
ich glaub mein sed kann nicht mehr zählen :(
ich möchte die Zahlenfolge 12345 durch PLZ ersetzen und habe folgenden
Test gemacht:
echo test 12345 test | sed s/[0-9]\{5\}/PLZ/g
und habe folgendes Ergebnis erwartet: test PLZ test leider kommt test 12345
test - was mach ich da falsch?
On Tue, Dec 17, 2002 at 09:46:30PM +0100, Andre Fischer wrote:
ich glaub mein sed kann nicht mehr zählen :(
ich möchte die Zahlenfolge 12345 durch PLZ ersetzen und habe folgenden
Test gemacht:
echo test 12345 test | sed s/[0-9]\{5\}/PLZ/g
wenn ich mich recht erinnere, kann sed nicht den
Am Dienstag, 17. Dezember 2002 22:08 schrieb Wolfgang Erig:
On Tue, Dec 17, 2002 at 09:46:30PM +0100, Andre Fischer wrote:
ich glaub mein sed kann nicht mehr zählen :(
ich möchte die Zahlenfolge 12345 durch PLZ ersetzen und habe
folgenden Test gemacht:
echo test 12345 test | sed
Hallo,
Andre Fischer [EMAIL PROTECTED]:
echo test 12345 test | sed s/[0-9]\{5\}/PLZ/g
und habe folgendes Ergebnis erwartet: test PLZ test leider kommt
test 12345 test - was mach ich da falsch?
Deine Shell verschluckt die Backslashes. Probiere es mal mit
echo test 12345 test | sed
Andreas Wodrich wrote:
fisch wrote:
Am Dienstag, 17. Dezember 2002 22:08 schrieb Wolfgang Erig:
On Tue, Dec 17, 2002 at 09:46:30PM +0100, Andre Fischer wrote:
ich glaub mein sed kann nicht mehr zählen :(
ich möchte die Zahlenfolge 12345 durch PLZ ersetzen und habe
folgenden Test gemacht:
Am Dienstag, 17. Dezember 2002 22:50 schrieb [EMAIL PROTECTED]:
Andre Fischer schrieb:
ich möchte die Zahlenfolge 12345 durch PLZ ersetzen und habe
folgenden Test gemacht:
echo test 12345 test | sed s/[0-9]\{5\}/PLZ/g
und habe folgendes Ergebnis erwartet: test PLZ test leider kommt test
60 matches
Mail list logo