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
Post a Comment