| |
| |
| |
|
Comments:
<0> how do i cut from a line and keep the delimiter on the output? eg: this:test:bleh will output as :test: <1> s/[^:]*\(:[^:]*:\).*/\1/ <0> wow <0> thanks
<1> np. <2> Dumb question: is there something like s/// that takes static strings rather than regexs? <3> hello. can someone explain me this line? why I need unmatched [0-9] pattern to duplicate the numbers? echo "aaa 123" | sed 's/[0-9][0-9]*/& &/' <4> sine: what' don't you understand? <4> & represents the 'match' or so, btw (in this case number one or more) <3> calmar: i know already, but thanks <2> Anybody know of a major mode for Emacs for editing sed scripts? <5> hello, can anyone look at this ? http://bin.cakephp.org/view/1395361516 ive got 2 simple find and replace commands and one of it doesnt work :/ <5> generally can i do smth like sed "s/string/replace/g s/other_string/other_replace/g" some/file ? <5> oh ok i should you a semicolon :) <5> that was hard to spot in the man :) <1> :) <1> sed -e 's/a/b/g' -e 's/c/d/g' ## or this <5> prec: ahh ok thx good to know <6> cool! i didn't know this existed!
<7> Yes. :) <1> floyd_n_milan: It not only exists, it's _alive_. <6> :) <8> how can i p*** the output of command 'pwd' for sed to copy into file? thx. <1> moloko: Using the w command, or do you mean something else? <1> moloko: Ah, you want to use the shell to do this; sed can't run other programs and substitute their output. <6> im not sure i understand <1> echo DIRECTORY |sed 's:DIRECTORY:'"`pwd`"':' <8> i have a long list of file names saved into a file - one filename per line; i would like in the beginning of each line to append the output of command 'pwd' <6> oh <1> sed "s:^:`pwd`:" <1> Note I'm using : to delimit the s command arguments. <1> echo sed "s:^:`pwd`:" ## This shows why. <8> prec: heeey, thank you so much! this is exactly what i wanted!! :) <8> i'm trying to do a playlist with several hundred files, and need their absolute paths. thanks!
Return to
#sed or Go to some related
logs:
qt4 sles9 #debian css scale background image
ubuntu how does gdm authenticate? ubuntu bbo #linux scaling_max_freq permission denied nvram-wakeup grub reboot libc.mo Ubuntu dapper mount: wrong fs type, bad option, bad superblock on /dev/sdc1
|
|