Print this page
XXX Remove nawk(1)

*** 20,31 **** # CDDL HEADER END # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # - # ident "%Z%%M% %I% %E% SMI" - # # # Get the path/ppdfilename for this ppd NickName # Input: # make: model: ppdlabel: ppd: --- 20,29 ----
*** 60,76 **** if [[ $# -lt 4 ]]; then exit 1 fi [[ -f /var/lp/ppd/ppdcache ]] || exit 1 ! make=$(echo $* | /usr/bin/nawk '{FS=":"; print $1}') # strip leading blanks ! model=$(echo $* | /usr/bin/nawk '{FS=":"; print $2}' | /bin/sed -e 's/^[ ]*//') ! extppdlabel=$(echo $* | /usr/bin/nawk '{FS=":"; print $3}' | /bin/sed -e 's/^[ ]*//') ! ppd=$(echo $* | /usr/bin/nawk '{FS=":"; print $4}' | /bin/sed -e 's/^[ ]*//') # # Do not use ":" with $make. printmgr collapses manufacturer name # to first word, ie PrintersRus and PrintersRus International become --- 58,74 ---- if [[ $# -lt 4 ]]; then exit 1 fi [[ -f /var/lp/ppd/ppdcache ]] || exit 1 ! make=$(echo $* | /usr/xpg4/bin/awk '{FS=":"; print $1}') # strip leading blanks ! model=$(echo $* | /usr/xpg4/bin/awk '{FS=":"; print $2}' | /bin/sed -e 's/^[ ]*//') ! extppdlabel=$(echo $* | /usr/xpg4/bin/awk '{FS=":"; print $3}' | /bin/sed -e 's/^[ ]*//') ! ppd=$(echo $* | /usr/xpg4/bin/awk '{FS=":"; print $4}' | /bin/sed -e 's/^[ ]*//') # # Do not use ":" with $make. printmgr collapses manufacturer name # to first word, ie PrintersRus and PrintersRus International become
*** 81,88 **** # /bin/grep "${make}" /var/lp/ppd/ppdcache | /bin/grep "${model}:" | /bin/grep "${ppd}:" | /bin/grep "$(rep_path ${extppdlabel})/${extppdlabel%\(*}" | ! /usr/bin/nawk '{FS=":"; print $6}' exit 0 --- 79,86 ---- # /bin/grep "${make}" /var/lp/ppd/ppdcache | /bin/grep "${model}:" | /bin/grep "${ppd}:" | /bin/grep "$(rep_path ${extppdlabel})/${extppdlabel%\(*}" | ! /usr/xpg4/bin/awk '{FS=":"; print $6}' exit 0