Re: right justify each line?

"'Ruud H.G. van Tol' [email protected] [sed-users]" <[email protected]>
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
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.