| |
| |
| |
|
Comments:
<0> Anyone know what's wrong with using s/"// to remove all the quotation marks from a file? <0> I tried escaping the quote and got the same result.. I'm using GNU sed. <1> tr -d \" < file <0> you cheated... <1> I did. <0> thanks none the less
<1> or <1> using sed, sed 's/\"//g' file <0> nice <1> 's/\"//' works, but it only deletes the first one <1> the g flag does it for all matches <0> oh, that makes sense <0> bleh, i should've realized that was working and removing the first quote <0> oh well <1> you shouldn't <1> it took me 3 goes to notice :-) <0> hehe <1> i guess the brain doesn't like "s <0> well ours don't anyway <1> :-) <0> :) <2> hi <2> anyone know how i can nicely remove only four space from the start of the line? i was using sed -e 's/\ \ \ \ //g' but i was wondering if there would be a more compact way todo this <2> i was thinking of something like sed -e 's/^[\ ]4//g' <3> sed 's/^[[:space:]]\{4\}//' <3> possie: you dont have to actually escape a space <3> sed 's/^ \{4\}//' should also do <2> ow okee :-) <3> [[:space:]] is used for general case <3> takes care of tab also <2> ah thanks a lot <4> does anyone knows how to add " \" (space and \) at the end of each line in a file with sed?
<5> Varoudis|Laptop: sed 's/$/ /\' filename <5> Varoudis|Laptop: \ needs to be escaped in sed <5> Varoudis|Laptop: sed 's/$/ /\/' filename <5> oops, forgot the trailing / <5> Varoudis|Laptop: sed 's/$/ /\//' filename <4> thnx alot <5> ok <5> Varoudis|Laptop: this works finally; sed 's/$/ \//' filename <5> i got sed dyslexia today ;) <4> :) i got dyslexia all the time :) <5> hehe, been there, none that too ;0 <5> Varoudis|Laptop: sed '/^#/!s/$/ \//' filename # do not add the / to lines that start with a # <4> thnx <5> Varoudis|Laptop: sure, guessing your editing some script that has commands on more than one line, so the / at the end of the line <4> yeap i need to add all installed packs from a ubuntu laptop to another <5> Varoudis|Laptop: ok, ask in #ubuntu for hints on the install and #bash for the bash scripting <4> now im ok :) <5> cool <4> gnubien, can you give me again the last command you post <5> sed '/^#/!s/$/ \//' filename # do not add the / to lines that start with a # <5> this works finally; sed 's/$/ \//' filename <4> adds /?? <5> Varoudis|Laptop: explain, pls <4> add \ ? <4> at the end of each line I need \ <5> ok <4> to use it in the script <5> sed 's/$/ \\/' filename <4> thnx <5> ok, have fun ;)
Return to
#sed or Go to some related
logs:
ubuntu firmware-extractor getaddrbyname php PHP Warning: Function registration failed - duplicate name - odbc_ mplayer vobsub Could not determine file format default player + mozilla + mplayer gentoo conroe flags r2500 wireless debian #gentoo #bash ssh unreachable ubuntu
|
|