whitespace - Sed - Adding white spaces to the end of line -


after research here ran across use of sed :

sed 's/$/       /' filein > fileout 

this worked expected in files, , added spaces end of line.

my problem in different file :

aaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccccc 

and after running same command append spaces (7) @ end of each line, basicly adds different line , puts 7 spaces there, :

aaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbb(cr) spacesx7(cr)(lf) bbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccccc(cr) spacesx7(cr)(lf) 

could me? thank in advance

try this:

dos2unix < filein | sed 's/$/       /' > fileout 

Comments

Popular posts from this blog

php - Extract Text from HTTP referer -

Receive udp packets in android gstreamer -

ios - How to Rectify the Relationship Fault in CoreData While parsing RESTKIT? -