alaskian
08-29-2002, 01:34 PM
i am currently trying out some sed commands, and the command works if i pipe it to an output file, however, won't update the current file i'm working with. do i just not know sed correctly? example, i have the following file called list which contains the following lines:
John Doe 123 Hollywood Drive, San Francisco CA
Mary Jane 845 Woods Drive, Minnesota, MN
If I type the following command at the linux prompt, the correct correction displays, however, isn't saved to the file "list". but if i pipe it out to an output file, the results are then put into the output file. is this how sed works or am i missing something. here is the following replace command i am using to replace CA with California.
sed 's/CA/California/' list - this command does not save
sed 's/CA/California/' list > output will save the corrected replacement in file output
Any help would be greatly appreciated!! Thanks!
John Doe 123 Hollywood Drive, San Francisco CA
Mary Jane 845 Woods Drive, Minnesota, MN
If I type the following command at the linux prompt, the correct correction displays, however, isn't saved to the file "list". but if i pipe it out to an output file, the results are then put into the output file. is this how sed works or am i missing something. here is the following replace command i am using to replace CA with California.
sed 's/CA/California/' list - this command does not save
sed 's/CA/California/' list > output will save the corrected replacement in file output
Any help would be greatly appreciated!! Thanks!