0

I know I can do " sed 's/old/new/g' filename to make the change to standard output.... however, is there a way that it would save the change to the file instead of just showing to the screen?

Another question on ed, i know i can search by using /target/ , but for example i need to change one of the x to y in a file which contains 50 x there. How do i pick the specific x I am looking for and do the change only to that specific x? Can anyone please give a quick example?

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by Salem
0

1. Look up the > and >> output redirection (and < input redirection)

2. Most ed command can be prefixed with a count, something like say 20s/target/

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.