Re: Spool & Trailing Blanks
From: Graeme Sargent <graeme_at_pyra.co.uk>
Date: 26 Jan 93 11:21:59 GMT
Message-ID: <1993Jan26.112159.869_at_pyra.co.uk>
Date: 26 Jan 93 11:21:59 GMT
Message-ID: <1993Jan26.112159.869_at_pyra.co.uk>
In <1993Jan25.133239.1_at_ntc02.tele.nokia.fi> kuismin_at_ntc02.tele.nokia.fi writes:
> line1 line1 <LF>
> line2 line2 line2 line2 <LF>
> line3 line3 line3 <LF>
> This is what I want to have:
> line1 line1<CR><LF>
> line2 line2 line2 line2<CR><LF>
> line3 line3 line3<CR><LF>
It's easy to do with UNIX:
sed -e "s/ *$//" file1 > file2
will replace all trailing blanks in "file1" with a single <CR> (^M) in "file2".
NB. to embed the <CR> in your sed command you type <CTRL>-V,<CTRL>-M
graeme
--
Disclaimer: The author's opinions are his own, and not necessarily
those of Pyramid Technology Ltd. or Pyramid Technology Inc.
--------------------------------------------------------------------------------
-m------- Graeme Sargent Voice: +44 (0)252 373035
---mmm----- Senior Database Consultant Fax : +44 (0)252 373135
-----mmmmm--- Pyramid Technology Ltd. Telex: Tell who???
-------mmmmmmm- Farnborough, Hants GU14 7PL Email: graeme_at_pyra.co.uk
--------------------------------------------------------------------------------
We have the technology. The tricky bit is learning how to use it.
--
graeme
--
Disclaimer: The author's opinions are his own, and not necessarily
those of Pyramid Technology Ltd. or Pyramid Technology Inc.
Received on Tue Jan 26 1993 - 12:21:59 CET
