Why the file is not changed?
pksat:[/export/home/oracle/vlai] cat t0605
test data
pksat:[/export/home/oracle/vlai] sed 's/data/dxdx/g' t0605
test dxdx
pksat:[/export/home/oracle/vlai] cat t0605
test data
Printable View
Why the file is not changed?
pksat:[/export/home/oracle/vlai] cat t0605
test data
pksat:[/export/home/oracle/vlai] sed 's/data/dxdx/g' t0605
test dxdx
pksat:[/export/home/oracle/vlai] cat t0605
test data
Using sed, the changes will be written to standard out. What you need to do is redirect the output to a new file, and then (if required) rename the newly created file to t0605. e.g.
sed 's/data/dxdx/g' t0605 >temp_t0605
mv temp_t0605 t0605
HTH
David.