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
1 1 #!/usr/bin/ksh
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License (the "License").
7 7 # You may not use this file except in compliance with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
↓ 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