Posted by: K6 March 12, 2009
unix help plz
Login in to Rate this Post:     0       ?        
Not sure if this is helpful but 's/\n//g' ko 's' bhanya search for ho, ani the next '/' bhanya next command ho, '/n' represents the newline character. '//' bhanya replace with nothing ho ani 'g' bhanya global. so it means search for \n ani replace with nothing, through the text body.

For example you might have:

The quick brown fox jumps over the lazt dogs.
The quick brown fox jumps over the lazt dogs.
The quick brown fox jumps over the lazt dogs.The quick brown fox jumps over the lazt dogs.
The quick brown fox jumps over the lazt dogs.
The quick brown fox jumps over the lazt dogs.


now if u wanna change 'lazt' into 'lazy' for the whole body of text, just do ' s/lazt/lazy/g' and ure good :)

peace.

Read Full Discussion Thread for this article