Andy Roberts wrote in a message to Holger Granholm:
HG> Still running DOS programs from 1988 like the previously mentioned
HG> BOTH.
AR> LOL.. strange you should mention BOTH.
AR> I very recently opened that up again, having used it many years
AR> ago.
Hey, I used to run that too. Very nice print utility.
AR> I was looking for a quick way to add blank spaces for a left
AR> margin.
I use GAWK or SED.
GAWK '{print " "$0}' file.txt >lpt1
AWK is one of the greatest text processing utes made. That line tells GAWK to
print some spaces " ", then then each line ($0) in file.txt, and send it to
the printer. $0 is the whole line, $1...$NF is the first space seperated word
in the line through $NF, with $NF being the Number of Fields in each line, or,
the last field in a line. You can do damn near anything with a text file with
AWK. Thats about as easy as it gets.
Look for:
GAWK304D.ZIP GAWK Documentation (926K)
GAWK304X.ZIP GAWK Text Processing Language for OS/2, DOS and WIN32. (435K)
I use an earlier version than the above, but I figure this one works. You
need EMX installed to run it in OS/2. GREP, SED and AWK are the three most
useful UNIX utilities made, you can do tons of neat stuff with them.
Jack
--- timEd/2-B11
140/1
278/111
* Origin: Jack's Free Lunch 4OS2 USR 56k Pgh Pa (412)492-0822 (1:129/171)
|