columns

Mark J. Reed mark.reed at sware.com
Wed Feb 21 14:26:14 EST 1996


P.S. All of the example command lines read the |-separated file on
standard input and write the newline-separated file on standard
output, so the usual way to run it would be
	command-line <inputfile >outputfile
e.g.
	perl -pe '$_ = join("\n", split(/\s*\|\s*/));' <pipe_dream >line_up

\ 
\ sed (strips whitespace - note that part of the command is on the second line):
\ 	sed -e 's/[ 	]*\|[ 	]*/\
\ /g'
\ 
\ awk (doesn't strip whitespace):
\ 	awk -F\| '{for (i=0; i<=NF; ++i) {printf "%s\n", $i}}' 
\ 
\ perl (strips whitespace):
\ 	perl -pe '$_ = join("\n",split(/\s*\|\s*/));'



--
Mark J. Reed
Email: mark.reed at sware.com - Voice: +1 404 315 6296 x158 - Fax: +1 404 315 0293
SecureWare, Inc. / 2957 Clairmont Rd Suite 200 / Atlanta GA 30329-1647
E-Mail Privacy by SecureMail.  Visit URL:http://www.secureware.com for details.






More information about the Ale mailing list