#not needed if in tcsh: #!/bin/csh -f ### e2ps: enscript pretty .ps to 2 columns # of $file with $fontsize $fontfamily ### usage: e2ps file fontsize [fontfamily] [r](rotated) ### also see: aps, e1ps scripts ###................................ set path: set enscr = /usr/local/bin/enscript echo " " set file = $1 set fnt = $2 set fntfam = $3 set rot = $4 set ind = $5 echo ' ==> enscript an ascii file (2 columns) <==' if( "$1" == "" ) then echo -n ' Usage: e2ps file font [cht] [r] [2c]- Enter file name: ' set file = $< endif if( "$2" == "" ) then echo -n ' Usage: e2ps file font [cht] [r] [2c]- Enter font size: ' set fnt = $< endif if( "$3" == "" ) then echo ' Usage: e2ps file font [cht] [r] [2c]' echo -n ' - Enter c-Courier h-Helvetica t-Times: ' set fntfam = $< endif if( "$4" == "" ) then echo -n ' - Enter r (rotated=landscape) _OR_ blank: ' set rot = $< endif if( "$rot" == "r" ) then set rot = "-2r" else set rot = "-2" endif if( "$5" == "" ) then echo -n ' - Enter indent (1i , 2c) _OR_ blank: ' set ind = $< endif if( "$ind" == "" ) then set indent = "-i 0c" else set indent = "-i $ind" endif switch( "$fntfam" ) case c: ## Courier echo $enscr -B $rot $indent -fCourier-Bold"$fnt" -p"$file".ps $file $enscr -B $rot $indent -fCourier-Bold"$fnt" -p"$file".ps $file breaksw case h: ## Helvetica echo $enscr -B $rot $indent -fHelvetica"$fnt" -p"$file".ps $file $enscr -B $rot $indent -fHelvetica"$fnt" -p"$file".ps $file breaksw case t: ## Times-Roman echo $enscr -B $rot $indent -fTimes-Roman"$fnt" -p"$file".ps $file $enscr -B $rot $indent -fTimes-Roman"$fnt" -p"$file".ps $file breaksw endsw echo "" echo -n " ---> If you do NOT want to 'gv file.ps' now, Enter n : " set no = $< if( "$no" == "n" ) then exit endif gv "$file".ps exit