Re: right justify each line?
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <[email protected]> |
> $ cat input.x > 99--- > ---99 > -9--- > -9-9- > 99999 As was suggested before, if all lines have the right number of trailing spaces, then just move those to the front. sed 's~^\(.*[^ ]\)\( *\)~\2\1~' input.txt -- Ruud