
11-25-2008
|
|
Supporter (in vino veritas)
|
|
|
Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
|
|
Quote:
Originally Posted by sohaibs
Hi,
Im trying to find and replace text within a unix file using sed.
The command that i have been using is
sed '/,null,/ s//, ,/g' result.txt>result.tmp
for replacing ",null," with ", ,".
But this only replaces the first occurrance of ,null, in every line. I want to do it globally.
It works fine if i exclude all the commas.
Please help.
|
Doesn't this work ?
Code:
sed -e "s/,null,/, ,/g" result.txt > result.tmp
|