Replace Line Feed with a Space in unix shell script -


i have text file containing records. each record splitted in 4 rows (not 4), example:

---- row1 row2 row3 row4 ---- row1 etc... 

each row ended line feed character (lf). ok, need obtain record in 1 line, replacing lf character space, in example:

---- row1 row2 row3 row4 ---- row1 row2 ...etcetera 

any or suggestion solution? in advance.

maybe can work ?

cat file | xargs | sed "s/ ---- /\n---- /g" 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -