James B. Byrne writes:
>
> I have a question regarding the vi editor under POSiX (5.5PP2)
>
> How does one use the s command to replace line feeds at the end of
> lines. On HP-UX I can enter the command:
>
> %s /^V<enter>//g
On MPE and HPUX I do the following in vi to delete the last character of every
line:
:1,$s/.$//
The key is ".$": . = any character, $ = at the end of the line.
--
Mark Bixby E-mail: [log in to unmask]
Coast Community College Dist. Web: http://www.cccd.edu/~markb/
District Information Services 1370 Adams Ave, Costa Mesa, CA, USA 92626-5429
Technical Support Voice: +1 714 438-4647
"You can tune a file system, but you can't tune a fish." - tunefs(1M)