#not needed if in tcsh: #!/bin/csh -f ### e1ps: enscript pretty .ps of $file with $fontsize $fontfamily ### usage: e1ps file fontsize fontfamily [r](rotated) [indent] ### also see: aps, e2ps 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 (single column) <==' echo " " if( "$1" == "" ) then echo -n ' Usage: e1ps file font [cht] [r] [2c] - Enter file name: ' set file = $< endif if( "$2" == "" ) then echo -n ' Usage: e1ps file font [cht] [r] - Enter font size: ' set fnt = $< endif if( "$3" == "" ) then echo ' Usage: e1ps file font [cht] [r]' 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 = "-r" else set rot = "-R" endif if( "$5" == "" ) then echo -n ' - Enter indent (e.g. 1i or 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 gv "$file".ps endif exit