Print this page
XXX Remove nawk(1)

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/print/scripts/getmodels
          +++ new/usr/src/cmd/print/scripts/getmodels
↓ open down ↓ 14 lines elided ↑ open up ↑
  15   15  # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16   16  # If applicable, add the following below this CDDL HEADER, with the
  17   17  # fields enclosed by brackets "[]" replaced with your own identifying
  18   18  # information: Portions Copyright [yyyy] [name of copyright owner]
  19   19  #
  20   20  # CDDL HEADER END
  21   21  #
  22   22  # Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23  # Use is subject to license terms.
  24   24  #
  25      -# ident "%Z%%M% %I%     %E% SMI"
  26      -#
  27   25  
  28   26  #
  29   27  # get a list of the Models for this Model from the ppdcache
  30   28  #
  31   29  # Input:
  32   30  #       Manufacturer    (Note: printmgr passes only the first word
  33   31  #       Lexmark         of the manufacturer name)
  34   32  # Output:
  35   33  #       Manufacturer Model
  36   34  #       Lexmark Optra Color 1200
  37   35  
  38   36  if [[ $# -lt 1 ]]; then
  39   37          exit 1
  40   38  fi
  41   39  
  42   40  cachefile=/var/lp/ppd/ppdcache
  43   41  [[ -f $cachefile ]] || exit 1
  44      -/bin/grep "^$1" $cachefile | nawk '{FS=":"; print $2}' | uniq 
       42 +/bin/grep "^$1" $cachefile | /usr/xpg4/bin/awk '{FS=":"; print $2}' | uniq 
  45   43  exit 0
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX