Re: right justify each line?
| 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]