Re: Stripping EOL feeds...

2002-11-25 Thread Mark L. Kahnt
On Mon, 2002-11-25 at 01:04, sean finney wrote:
 On Sun, Nov 24, 2002 at 10:32:14PM -0600, ZephyrQ wrote:
  I'm trying to format the debian install manual (text version) for
  printing and I'm trying to save a couple of trees.  Is there an easy way
  to strip the line breaks so the text will come out unformatted?  This
  way I can reduce the font and print whole pages of itty bitty debian
  install text which, in my own sick way, helps me find info I need
  quicker...
 
 well, what about printing the text two columns to a page?  or
 in landscape mode with three columns per page?
 
 otherwise, a quick hack that will do the stripping eol trick is to
 rename the (pure text) file to .html, and then lynx -dump it, or
 print it from your favorite web-browser.
 
 oh, and i'm pretty sure vim can do stuff with newlines, i'd have
 to do some grepping through my mbox to find it but i had to sit
 down and figure that out at some point.   regardless, if you want
 speed i think the previously mentioned hack might do the trick.
 
 hth
   sean

There is always the option of piping it through 'fmt' with a suitably
long line length and other settings - it will eat the \n unless it sees
two consecutive ones, iirc. Check 'man fmt' to see if it can be tweaked
to what you want.
-- 
Mark L. Kahnt, FLMI/M, ALHC, HIA, AIAA, ACS, MHP
ML Kahnt New Markets Consulting
Tel: (613) 531-8684 / (613) 539-0935
Email: [EMAIL PROTECTED]



signature.asc
Description: This is a digitally signed message part


Re: Stripping EOL feeds...

2002-11-25 Thread ZephyrQ
On Sun, 2002-11-24 at 22:34, Sandip P Deshmukh wrote:
 
 sorry i am not an expert and myself learning to use vim. however, vim
 contain search and replace command. so basically we are trying to
 replace EOL with nothing. how exactly the command will look - i do not
 know :(

Thank you to all who sent options.  I tried various commands, including
the 'cat' command piped to 'tr'.  This gave me what I asked for--though
a little sloppy.

I wish a word processor would make it easier to find/replace such
characters--just like Word Perfect used to (I assume they still do, but
I haven't used it since ver. 6)--this made reformatting a breeze and
allowed me to be creative with some of my macros.  Unfortunately, I do
*not* see any of the current WYSIWYG linux offerings doing the
same...emacs and vi(m) apparently can get the job done, but they both
require more expertise than I was able to learn in the time I had.

Again, thanx to all!




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Stripping EOL feeds...

2002-11-24 Thread ZephyrQ
I'm trying to format the debian install manual (text version) for
printing and I'm trying to save a couple of trees.  Is there an easy way
to strip the line breaks so the text will come out unformatted?  This
way I can reduce the font and print whole pages of itty bitty debian
install text which, in my own sick way, helps me find info I need
quicker...

Thank you.

BTW, I have looked in OO, Abiword, Vim, Emacs, etc. and I can *NOT*
find a tool to do this like the old Word Perfect 5.2 could (old sigh
here...).






-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Stripping EOL feeds...

2002-11-24 Thread Sandip P Deshmukh
On Sun, Nov 24, 2002 at 10:32:14PM -0600, ZephyrQ wrote:
   I'm trying to format the debian install manual (text version) for
 printing and I'm trying to save a couple of trees.  Is there an easy way
 to strip the line breaks so the text will come out unformatted?  This
 way I can reduce the font and print whole pages of itty bitty debian
 install text which, in my own sick way, helps me find info I need
 quicker...

sorry i am not an expert and myself learning to use vim. however, vim
contain search and replace command. so basically we are trying to
replace EOL with nothing. how exactly the command will look - i do not
know :(

-- 
regards,

sandip p deshmukh
--***

Whenever you find that you are on the side of the majority, it is time
to reform.
-- Mark Twain



msg15073/pgp0.pgp
Description: PGP signature


Re: Stripping EOL feeds...

2002-11-24 Thread will trillich
On Sun, Nov 24, 2002 at 10:32:14PM -0600, ZephyrQ wrote:
   I'm trying to format the debian install manual (text version) for
 printing and I'm trying to save a couple of trees.  Is there an easy way
 to strip the line breaks so the text will come out unformatted?  This
 way I can reduce the font and print whole pages of itty bitty debian
 install text which, in my own sick way, helps me find info I need
 quicker...

there's more than one way--here's one from perl (untested, so
understand everything you execute yourself):

#!/usr/bin/perl
local($/) = '';  # slurp \n\n paragraphs
while(){
s/\n/ /g;# ditch linefeeds
s/\s+/ /g;   # squeeze white space down to one space
print $_\n;# print line with (one) end-of-line char
}

then

perl yourScriptName.pl  input.text.fyl  output.text.fyl

-- 
I use Debian/GNU Linux version 2.2;
Linux server 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i586 unknown
 
DEBIAN NEWBIE TIP #84 from USM Bish [EMAIL PROTECTED]
:
Wondering if you could change the bindings of CTRL+ALT+DEL, so
that it did a shutdown instead of a reboot? Sure! As root,
edit /etc/inittab. The line to edit looks like this:
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
Just change -r to -h.

Also see http://newbieDoc.sourceForge.net/ ...


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Stripping EOL feeds...

2002-11-24 Thread will trillich
On Mon, Nov 25, 2002 at 10:04:48AM +0530, Sandip P Deshmukh wrote:
 On Sun, Nov 24, 2002 at 10:32:14PM -0600, ZephyrQ wrote:
  I'm trying to format the debian install manual (text version) for
  printing and I'm trying to save a couple of trees.  Is there an easy way
  to strip the line breaks so the text will come out unformatted?  This
  way I can reduce the font and print whole pages of itty bitty debian
  install text which, in my own sick way, helps me find info I need
  quicker...
 
 sorry i am not an expert and myself learning to use vim. however, vim
 contain search and replace command. so basically we are trying to
 replace EOL with nothing. how exactly the command will look - i do not
 know :(

vim is really powerful once you get into the macro language
(there's probably a way to program a prime number generator in
there somewhere) but for the standard user interaction it's a
LINE-ORIENTED beast. you can split a line here to make two
lines, you can join two lines together to make one big one --
but for the most part you can't massage text across lines.

not without some serious hair on your macros.

:%s/pattern/replacement/g
finds pattern in all lines and replaces each with
replacement. it doesn't span lines, it searches all lines.

vim is great, but it has its stumbling blocks...

-- 
I use Debian/GNU Linux version 2.2;
Linux server 2.2.17 #1 Sun Jun 25 09:24:41 EST 2000 i586 unknown
 
(11 matched vim)
DEBIAN NEWBIE TIP #47 from Will Trillich [EMAIL PROTECTED]
:
Want to LEARN MORE ABOUT VIM? From inside vim (when you're
editing some text) try
:help
:help howto
:help options
Type ctrl-W ctrl-W to switch 'panes', or ctrl-W q to close
one. (Try :help CTRL-W for more details on control-W.)

Also see http://newbieDoc.sourceForge.net/ ...


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]




Re: Stripping EOL feeds...

2002-11-24 Thread Travis Crump
will trillich wrote:

On Mon, Nov 25, 2002 at 10:04:48AM +0530, Sandip P Deshmukh wrote:


On Sun, Nov 24, 2002 at 10:32:14PM -0600, ZephyrQ wrote:


	I'm trying to format the debian install manual (text version) for
printing and I'm trying to save a couple of trees.  Is there an easy way
to strip the line breaks so the text will come out unformatted?  This
way I can reduce the font and print whole pages of itty bitty debian
install text which, in my own sick way, helps me find info I need
quicker...




vim is really powerful once you get into the macro language
(there's probably a way to program a prime number generator in
there somewhere) but for the standard user interaction it's a
LINE-ORIENTED beast. you can split a line here to make two
lines, you can join two lines together to make one big one --
but for the most part you can't massage text across lines.
vim is great, but it has its stumbling blocks...



How to do this in vim:
G
remember what line number is the last line, call it N
gg
number N J

In general, you can put a large number before most commands to do the 
command that many times...[For this command vim doesn't like it if you 
try to join more lines than exist]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Stripping EOL feeds...

2002-11-24 Thread sean finney
On Sun, Nov 24, 2002 at 10:32:14PM -0600, ZephyrQ wrote:
   I'm trying to format the debian install manual (text version) for
 printing and I'm trying to save a couple of trees.  Is there an easy way
 to strip the line breaks so the text will come out unformatted?  This
 way I can reduce the font and print whole pages of itty bitty debian
 install text which, in my own sick way, helps me find info I need
 quicker...

well, what about printing the text two columns to a page?  or
in landscape mode with three columns per page?

otherwise, a quick hack that will do the stripping eol trick is to
rename the (pure text) file to .html, and then lynx -dump it, or
print it from your favorite web-browser.

oh, and i'm pretty sure vim can do stuff with newlines, i'd have
to do some grepping through my mbox to find it but i had to sit
down and figure that out at some point.   regardless, if you want
speed i think the previously mentioned hack might do the trick.

hth
sean



msg15088/pgp0.pgp
Description: PGP signature


Re: Stripping EOL feeds...

2002-11-24 Thread Eric G. Miller
On Sun, Nov 24, 2002 at 10:32:14PM -0600, ZephyrQ wrote:
   I'm trying to format the debian install manual (text version) for
 printing and I'm trying to save a couple of trees.  Is there an easy way
 to strip the line breaks so the text will come out unformatted?  This
 way I can reduce the font and print whole pages of itty bitty debian
 install text which, in my own sick way, helps me find info I need
 quicker...

An alternative approach.  Use something like enscript to format it into
postscript with two pages per physical page.  Then print duplex...

-- 
...the plural of anecdote is [not?] data.  - attrib. to George Stigler


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]