@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet


Comments:

<0> hello i'm having troubel when trying to run sed from a bash script
<0> FILES=`ls *.xsl`
<0> for FILE in $FILES
<0> do
<0> FILE_OLD=$FILE".old"
<0> mv $FILE $FILE_OLD



<0> sed_command="sed 's/$1/$2/g' $FILE_OLD > $FILE"
<0> echo $sed_command
<0> $sed_command
<0> done
<0> this is the script
<0> and i get this error
<0> sed: -e expression #1, char 1: unknown command: `''
<0> sed 's/CuentosInfantiles/BodegasVino/g' tinymce.xsl.old > tinymce.xsl
<0> sed: -e expression #1, char 1: unknown command: `''
<0> if i excute de sed line out of script in runs with out erros
<0> any ideas what is wrong? thanks
<1> woah, use a paste site please.
<1> blah=`command`; for f in "$blah"; do XXX; done Seems a common idiom.
<1> command |while read file; do XXX; done ## I prefer this instead.
<1> http://www.rafb.net./paste/results/9LcvLr89.html
<0> thanks prec i'll go to try it
<0> :D i works fine thanks again
<1> Note that if $1 or $2 contain unescaped characters, it will fail.
<2> hello all
<3> how to insert 3 lines before the fined line?
<4> hello



<4> i have text file with any line , i need join odd line to even line, 1 to 2 and 3 to 4 ... is it possible with sed? or awk ?
<5> yes
<6> how do i delete first 2 lines of all files in a directory
<7> find /directory -type f -exec sed -i.backup '1,2d' {} \;
<7> NOT TESTED
<7> May cause your computer to explode
<7> (actually, this will do it recursively)
<8> how can i just do a match with sed so i can see if $? is 1 or 0?
<9> if (($? == 0)); then echo 0; else echo not zero; fi
<9> ***umes you're using BASH
<9> no need for sed, in this case.
<8> no no no
<9> ok.
<8> i want match said againt a string i just cant find the syntax
<9> Educate me.
<9> What string?
<8> like echo TH123| sed /TH123/; if $? == 0 ....
<7> use grep
<7> case solved
<9> eh
<8> oh heh
<8> yeah
<8> im retarded.


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sed
or
Go to some related logs:

qemu can't ping 10.0.2.4 freebsd
linux sokuban
#linux
#perl
jackd control open (No such device)
#css
apt-get perl-dev
qtparted default block size
debian et d920
bacula netgear error



Home  |  disclaimer  |  contact  |  submit quotes