Re: right justify each line?

"[email protected] [sed-users]" <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <[email protected]>
You mentioned that all lines are of equal length,  for that you can use this :
 

 N.B. the dash is representing the space, so change accordingly
 when you run with the actual input data.
 

 sed -e '
    s/\(\([^-]\).*\2\)\(.*\)/\3\1/;t

    s/\([^-]\)\(.*\)/\2\1/
 '  yourfile
 

 -Rakesh



[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.