PATH:
usr
/
bin
#!/bin/sh # # Unix lpr filter. The default setup sends output directly to a pipe, # which requires the Ghostscript process to fork, and thus may cause # small systems to run out of memory/swap space. An alternative strategy, # based on a suggestion by Andy Fyfe (andy@cs.caltech.edu), uses a named # pipe for output, which avoids the fork and can thus save a lot of memory. # # Unfortunately this approach can cause problems when a print job is aborted, # as the abort can cause one of the processes to die, leaving the process # at the other end of the pipe hanging forever. # # Because of this, the named pipe method has not been made the default, # but it may be restored by commenting out the lines referring to # 'gsoutput' and uncommenting the lines referring to 'gspipe'. # # This definition is changed on install to match the # executable name set in the makefile GS_EXECUTABLE=gs PBMPLUSPATH=/usr/local/bin PSFILTERPATH=/usr/local/lib/ghostscript LOCALPATH=/usr/local/bin X11HOME=/usr/X11R6 PATH=/bin:/usr/bin:/usr/ucb:/usr/etc PATH=${PATH}\:${LOCALPATH}\:${PBMPLUSPATH}\:${PSFILTERPATH} LD_LIBRARY_PATH=${X11HOME}/lib export PATH LD_LIBRARY_PATH acctfile host user user= host= acctfile=/dev/null # # Redirect stdout to stderr (for the logfile) and open a new channel # connected to stdout for the raw data. This enables us to keep the # raw data separate from programmed postscript output and error messages. # exec 3>&1 1>&2 # # Get username and hostname from filter parameters # while [ $# != 0 ] do case "$1" in -n) user=$2 ; shift ;; -h) host=$2 ; shift ;; -*) ;; *) acctfile=$1 ;; esac shift done # # Get the filter, printer device and queue type (direct/indirect) # filter=`basename $0` device=`dirname $0` type=`dirname ${device}` device=`basename ${device}` fdevname=$device type=`basename ${type}` # # Find the bpp and number of colors, if specified # colorspec="`echo ${device} | sed 's/.*\.[0-9][0-9]*\.\([0-9][0-9]*\)$/\1/'`" if test "$colorspec" = "${device}" then colorspec="" else device=`basename ${device} .$colorspec` colorspec="-dColors=$colorspec" fi bpp="`echo ${device} | sed 's/.*\.\([0-9][0-9]*\)$/\1/'`" if test "$bpp" = "${device}" then bpp=1 else device=`basename ${device} .$bpp` fi # # Information for the logfile # lock=`dirname ${acctfile}`/lock cf=`sed -n '$p' ${lock}` job=`sed -n 's/^J//p' ${cf}` echo "gsbanner: ${host}:${user} Job: ${job} Date: `date`" echo "gsif: ${host}:${user} ${fdevname} start - `date`" # # Set the direct or indirect output destinations # #gspipe=/tmp/gspipe.$$ #mknod ${gspipe} p case "${type}" in direct) gsoutput="cat 1>&3" ;; # cat ${gspipe} 1>&3 & ;; indirect) gsoutput="lpr -P${device}.raw" ;; # cat ${gspipe} | lpr -P${device}.raw & ;; esac ( # # Any setup required may be done here (eg. setting gamma for colour printing) # #echo "{0.333 exp} dup dup currenttransfer setcolortransfer" # # The input data is filtered here, before being passed on to Ghostscript # case "${filter}" in gsif) cat ;; gsnf) psdit ;; gstf) pscat ;; gsgf) psplot ;; gsvf) rasttopnm | pnmtops ;; gsdf) dvi2ps -sqlw ;; gscf|gsrf) echo "${filter}: filter not available" 1>&2 ; exit 0 ;; esac # # This is the postlude which does the accounting # echo "\ (acctfile) getenv { currentdevice /PageCount gsgetdeviceprop dup cvi 0 gt { exch (a) file /acctfile exch def /string 20 string def string cvs dup length dup 4 lt { 4 exch sub { acctfile ( ) writestring } repeat } { pop } ifelse acctfile exch writestring acctfile (.00 ) writestring acctfile (host) getenv { string cvs } { (NOHOST) } ifelse writestring acctfile (:) writestring acctfile (user) getenv { string cvs } { (NOUSER) } ifelse writestring acctfile (\n) writestring acctfile closefile } { pop } ifelse } if quit" ) | $GS_EXECUTABLE -q -P- -dSAFER -dNOPAUSE -sDEVICE=${device} \ -dBitsPerPixel=${bpp} $colorspec \ -sOutputFile=\|"${gsoutput}" - # -sOutputFile=${gspipe} - rm -f ${gspipe} # # End the logfile entry # echo "gsif: end - `date`"
[+]
..
[-] crontab.cagefs
[edit]
[-] passwd
[edit]
[-] ping
[edit]
[-] atq
[edit]
[-] uapi
[edit]
[-] atrm
[edit]
[-] crontab
[edit]
[-] at
[edit]
[-] cagefs_enter.proxied
[edit]
[-] batch
[edit]
[-] arch
[edit]
[-] awk
[edit]
[-] gawk
[edit]
[-] basename
[edit]
[-] cat
[edit]
[-] chgrp
[edit]
[-] chmod
[edit]
[-] chown
[edit]
[-] cp
[edit]
[-] cut
[edit]
[-] date
[edit]
[-] dd
[edit]
[-] df
[edit]
[-] echo
[edit]
[-] egrep
[edit]
[-] env
[edit]
[-] false
[edit]
[-] fgrep
[edit]
[-] grep
[edit]
[-] igawk
[edit]
[-] kill
[edit]
[-] link
[edit]
[-] ln
[edit]
[-] logger
[edit]
[-] login
[edit]
[-] ls
[edit]
[-] mkdir
[edit]
[-] mknod
[edit]
[-] more
[edit]
[-] mv
[edit]
[-] nice
[edit]
[-] pgawk
[edit]
[-] pwd
[edit]
[-] raw
[edit]
[-] rm
[edit]
[-] rmdir
[edit]
[-] sed
[edit]
[-] sleep
[edit]
[-] sort
[edit]
[-] stty
[edit]
[-] php
[edit]
[-] sync
[edit]
[-] taskset
[edit]
[-] touch
[edit]
[-] true
[edit]
[-] uname
[edit]
[-] unlink
[edit]
[-] [
[edit]
[-] addr2line
[edit]
[-] ar
[edit]
[-] as
[edit]
[-] base64
[edit]
[-] cal
[edit]
[-] c++filt
[edit]
[-] chcon
[edit]
[-] chrt
[edit]
[-] cksum
[edit]
[-] cmp
[edit]
[-] col
[edit]
[-] colcrt
[edit]
[-] colrm
[edit]
[-] column
[edit]
[-] comm
[edit]
[-] csplit
[edit]
[-] curl
[edit]
[-] diff
[edit]
[-] diff3
[edit]
[-] dir
[edit]
[-] dircolors
[edit]
[-] dirname
[edit]
[-] du
[edit]
[-] eqn
[edit]
[-] expand
[edit]
[-] expr
[edit]
[-] factor
[edit]
[-] file
[edit]
[-] find
[edit]
[-] flock
[edit]
[-] fmt
[edit]
[-] fold
[edit]
[-] geqn
[edit]
[-] getopt
[edit]
[-] gneqn
[edit]
[-] neqn
[edit]
[-] gnroff
[edit]
[-] nroff
[edit]
[-] gpic
[edit]
[-] pic
[edit]
[-] gprof
[edit]
[-] groff
[edit]
[-] grops
[edit]
[-] grotty
[edit]
[-] groups
[edit]
[-] gsoelim
[edit]
[-] soelim
[edit]
[-] gtbl
[edit]
[-] tbl
[edit]
[-] gtroff
[edit]
[-] troff
[edit]
[-] head
[edit]
[-] hexdump
[edit]
[-] hostid
[edit]
[-] id
[edit]
[-] install
[edit]
[-] ionice
[edit]
[-] ipcrm
[edit]
[-] ipcs
[edit]
[-] isosize
[edit]
[-] join
[edit]
[-] ld
[edit]
[-] ld.bfd
[edit]
[-] less
[edit]
[-] lessecho
[edit]
[-] lesskey
[edit]
[-] lesspipe.sh
[edit]
[-] logname
[edit]
[-] look
[edit]
[-] mcookie
[edit]
[-] md5sum
[edit]
[-] mkfifo
[edit]
[-] namei
[edit]
[-] nl
[edit]
[-] nm
[edit]
[-] nohup
[edit]
[-] objcopy
[edit]
[-] objdump
[edit]
[-] od
[edit]
[-] paste
[edit]
[-] pathchk
[edit]
[-] pinky
[edit]
[-] post-grohtml
[edit]
[-] pr
[edit]
[-] pre-grohtml
[edit]
[-] printenv
[edit]
[-] printf
[edit]
[-] ptx
[edit]
[-] ranlib
[edit]
[-] readelf
[edit]
[-] readlink
[edit]
[-] rename
[edit]
[-] renice
[edit]
[-] rev
[edit]
[-] runcon
[edit]
[-] script
[edit]
[-] sdiff
[edit]
[-] seq
[edit]
[-] setsid
[edit]
[-] setterm
[edit]
[-] sha1sum
[edit]
[-] sha224sum
[edit]
[-] sha256sum
[edit]
[-] sha384sum
[edit]
[-] sha512sum
[edit]
[-] shred
[edit]
[-] size
[edit]
[-] split
[edit]
[-] stat
[edit]
[-] strings
[edit]
[-] strip
[edit]
[-] sum
[edit]
[-] tac
[edit]
[-] tail
[edit]
[-] tailf
[edit]
[-] tee
[edit]
[-] test
[edit]
[-] tr
[edit]
[-] tsort
[edit]
[-] tty
[edit]
[-] ul
[edit]
[-] unexpand
[edit]
[-] uniq
[edit]
[-] users
[edit]
[-] vdir
[edit]
[-] wc
[edit]
[-] wget
[edit]
[-] whereis
[edit]
[-] which
[edit]
[-] whoami
[edit]
[-] xargs
[edit]
[-] yes
[edit]
[-] zsoelim
[edit]
[-] lynx
[edit]
[-] GET
[edit]
[-] mesg
[edit]
[-] gtar
[edit]
[-] tar
[edit]
[-] gunzip
[edit]
[-] gzip
[edit]
[-] zcat
[edit]
[-] bunzip2
[edit]
[-] bzip2
[edit]
[-] bzcat
[edit]
[-] bzcmp
[edit]
[-] bzdiff
[edit]
[-] bzgrep
[edit]
[-] bzip2recover
[edit]
[-] bzless
[edit]
[-] bzmore
[edit]
[-] zipinfo
[edit]
[-] gzexe
[edit]
[-] unzipsfx
[edit]
[-] c++
[edit]
[-] zcmp
[edit]
[-] zdiff
[edit]
[-] zegrep
[edit]
[-] zfgrep
[edit]
[-] zforce
[edit]
[-] zgrep
[edit]
[-] zip
[edit]
[-] zipcloak
[edit]
[-] zipgrep
[edit]
[-] gcc
[edit]
[-] zipnote
[edit]
[-] zipsplit
[edit]
[-] zless
[edit]
[-] zmore
[edit]
[-] znew
[edit]
[-] aclocal
[edit]
[-] autoconf
[edit]
[-] autoheader
[edit]
[-] autom4te
[edit]
[-] automake
[edit]
[-] autoreconf
[edit]
[-] autoscan
[edit]
[-] autoupdate
[edit]
[-] bison
[edit]
[-] c89
[edit]
[-] c99
[edit]
[-] vim
[edit]
[-] cc
[edit]
[-] xxd
[edit]
[-] flex
[edit]
[-] flex++
[edit]
[-] gcov
[edit]
[-] ldd
[edit]
[-] gmake
[edit]
[-] make
[edit]
[-] ifnames
[edit]
[-] lex
[edit]
[-] libtool
[edit]
[-] libtoolize
[edit]
[-] x86_64-redhat-linux-c++
[edit]
[-] x86_64-redhat-linux-g++
[edit]
[-] x86_64-redhat-linux-gcc
[edit]
[-] ex
[edit]
[-] a2p
[edit]
[-] rvi
[edit]
[-] rview
[edit]
[-] view
[edit]
[-] nano
[edit]
[-] rnano
[edit]
[-] rvim
[edit]
[-] h2ph
[edit]
[-] vimdiff
[edit]
[-] vimtutor
[edit]
[-] perl
[edit]
[-] gpg
[edit]
[-] gpg2
[edit]
[-] gpgsplit
[edit]
[-] gpgv
[edit]
[-] gpgv2
[edit]
[-] gpg-zip
[edit]
[-] catchsegv
[edit]
[-] gencat
[edit]
[-] getconf
[edit]
[-] getent
[edit]
[-] iconv
[edit]
[-] locale
[edit]
[-] localedef
[edit]
[-] rpcgen
[edit]
[-] sprof
[edit]
[-] tzselect
[edit]
[-] mogrify
[edit]
[-] convert
[edit]
[-] identify
[edit]
[-] composite
[edit]
[-] psed
[edit]
[-] mail
[edit]
[-] mailx
[edit]
[-] Mail
[edit]
[-] g++
[edit]
[-] my_print_defaults
[edit]
[-] mysql
[edit]
[-] vi
[edit]
[-] mysqladmin
[edit]
[-] mysqlbinlog
[edit]
[-] mysqlcheck
[edit]
[-] mysql_config
[edit]
[-] mysqldump
[edit]
[-] funzip
[edit]
[-] mysqlimport
[edit]
[-] mysqlshow
[edit]
[-] unzip
[edit]
[-] captoinfo
[edit]
[-] tic
[edit]
[-] clear
[edit]
[-] infocmp
[edit]
[-] infotocap
[edit]
[-] reset
[edit]
[-] tset
[edit]
[-] toe
[edit]
[-] tput
[edit]
[-] hostname
[edit]
[-] scp
[edit]
[-] sftp
[edit]
[-] slogin
[edit]
[-] ssh
[edit]
[-] ssh-add
[edit]
[-] ssh-agent
[edit]
[-] ssh-copy-id
[edit]
[-] ssh-keyscan
[edit]
[-] ssh-keygen
[edit]
[-] openssl
[edit]
[-] c2ph
[edit]
[-] cpan
[edit]
[-] bash
[edit]
[-] dbiprof
[edit]
[-] dbiproxy
[edit]
[-] find2perl
[edit]
[-] h2xs
[edit]
[-] cpp
[edit]
[-] instmodsh
[edit]
[-] libnetcfg
[edit]
[-] gs
[edit]
[-] perldoc
[edit]
[-] perl5.16.3
[edit]
[-] perlbug
[edit]
[-] perlthanks
[edit]
[-] perlivp
[edit]
[-] perlml
[edit]
[-] piconv
[edit]
[-] pl2pm
[edit]
[-] pod2html
[edit]
[-] pod2latex
[edit]
[-] pod2man
[edit]
[-] pod2text
[edit]
[-] pod2usage
[edit]
[-] podchecker
[edit]
[-] podselect
[edit]
[-] prove
[edit]
[-] pstruct
[edit]
[-] s2p
[edit]
[-] splain
[edit]
[-] gsbj
[edit]
[-] xsubpp
[edit]
[-] ps
[edit]
[-] free
[edit]
[-] pgrep
[edit]
[-] pkill
[edit]
[-] pmap
[edit]
[-] pwdx
[edit]
[-] skill
[edit]
[-] slabtop
[edit]
[-] snice
[edit]
[-] tload
[edit]
[-] top
[edit]
[-] uptime
[edit]
[-] vmstat
[edit]
[-] watch
[edit]
[-] pydoc
[edit]
[-] gsdj
[edit]
[-] python
[edit]
[-] python2
[edit]
[-] python2.7
[edit]
[-] screen
[edit]
[-] gslj
[edit]
[-] sh
[edit]
[-] bashbug-64
[edit]
[-] import
[edit]
[-] sqlite3
[edit]
[-] display
[edit]
[-] cldetect
[edit]
[-] realpath
[edit]
[-] pango-querymodules-64
[edit]
[-] tclsh
[edit]
[-] tclsh8.5
[edit]
[-] scl
[edit]
[-] Magick-config
[edit]
[-] aclocal-1.13
[edit]
[-] automake-1.13
[edit]
[-] m4
[edit]
[-] MagickCore-config
[edit]
[-] fc-pattern
[edit]
[-] fc-scan
[edit]
[-] pango-list
[edit]
[-] pango-view
[edit]
[-] freetype-config
[edit]
[-] icu-config
[edit]
[-] git-upload-archive
[edit]
[-] isql
[edit]
[-] odbc_config
[edit]
[-] MagickWand-config
[edit]
[-] gm
[edit]
[-] Wand-config
[edit]
[-] utmpdump
[edit]
[-] gsnd
[edit]
[-] truncate
[edit]
[-] icu-config-64
[edit]
[-] strace
[edit]
[-] mdig
[edit]
[-] nsupdate
[edit]
[-] gslp
[edit]
[-] hunspell
[edit]
[-] shuf
[edit]
[-] git-upload-pack
[edit]
[-] scl_enabled
[edit]
[-] git-receive-pack
[edit]
[-] compare
[edit]
[-] mktemp
[edit]
[-] clwpos-user
[edit]
[-] xsltproc
[edit]
[-] icuinfo
[edit]
[-] delv
[edit]
[-] tmpwatch
[edit]
[-] gpg-error
[edit]
[-] tabs
[edit]
[-] idn
[edit]
[-] who
[edit]
[-] scl_source
[edit]
[-] xmlcatalog
[edit]
[-] xmllint
[edit]
[-] aspell
[edit]
[-] ispell
[edit]
[-] precat
[edit]
[-] preunzip
[edit]
[-] prezip
[edit]
[-] prezip-bin
[edit]
[-] run-with-aspell
[edit]
[-] spell
[edit]
[-] word-list-compress
[edit]
[-] recode
[edit]
[-] stdbuf
[edit]
[-] cloudlinux-backup-helper-uid
[edit]
[-] xmlwf
[edit]
[-] enchant
[edit]
[-] enchant-lsmod
[edit]
[-] gpg-agent
[edit]
[-] pinentry
[edit]
[-] pinentry-curses
[edit]
[-] animate
[edit]
[-] pkg-config
[edit]
[-] montage
[edit]
[-] stream
[edit]
[-] gcc-ar
[edit]
[-] gcc-nm
[edit]
[-] gcc-ranlib
[edit]
[-] replace
[edit]
[-] dvipdf
[edit]
[-] eps2eps
[edit]
[-] gsdj500
[edit]
[-] timeout
[edit]
[-] ghostscript
[edit]
[-] git-shell
[edit]
[-] lprsetup.sh
[edit]
[-] pdf2dsc
[edit]
[-] pdf2ps
[edit]
[-] pf2afm
[edit]
[-] pfbtopfa
[edit]
[-] pphs
[edit]
[-] printafm
[edit]
[-] ps2ascii
[edit]
[-] ps2epsi
[edit]
[-] ps2pdf
[edit]
[-] ps2pdf12
[edit]
[-] ps2pdf13
[edit]
[-] ps2pdf14
[edit]
[-] ps2pdfwr
[edit]
[-] ps2ps
[edit]
[-] ps2ps2
[edit]
[-] unix-lpr.sh
[edit]
[-] nproc
[edit]
[-] cloudlinux-awp-user
[edit]
[-] fc-cache
[edit]
[-] fc-cache-64
[edit]
[-] fc-cat
[edit]
[-] fc-conflist
[edit]
[-] fc-list
[edit]
[-] fc-match
[edit]
[-] fc-query
[edit]
[-] fc-validate
[edit]
[-] selectorctl
[edit]
[-] git
[edit]
[-] mysql_config-64
[edit]
[-] geoiplookup
[edit]
[-] geoiplookup6
[edit]
[-] dltest
[edit]
[-] iusql
[edit]
[-] odbcinst
[edit]
[-] conjure
[edit]
[-] patch
[edit]
[-] numfmt
[edit]
[-] dig
[edit]
[-] host
[edit]
[-] nslookup
[edit]