Print this page
XXX Remove nawk(1)
@@ -167,11 +167,11 @@
esac
done
pos=$OPTIND
for prop in $4
do
- val=`/usr/bin/echo $2 | /usr/bin/nawk -v POS=$pos \
+ val=`/usr/bin/echo $2 | /usr/xpg4/bin/awk -v POS=$pos \
'{ print $POS }'`
if [ -z "$val" ]; then
val="$5"
fi
set_routeadm_property $1 $prop $val
@@ -186,12 +186,12 @@
# quotes around values including spaces.
#
get_daemon_args()
{
args=`/usr/sbin/svccfg -s $1 listprop routeadm/daemon-args | \
- /usr/bin/nawk '{ for (i = 3; i <= NF; i++) printf "%s ", $i }' | \
- /usr/bin/nawk '{sub(/^\"/, ""); sub(/\"[ \t]*$/,""); print}'`
+ /usr/xpg4/bin/awk '{ for (i = 3; i <= NF; i++) printf "%s ", $i }' | \
+ /usr/xpg4/bin/awk '{sub(/^\"/, ""); sub(/\"[ \t]*$/,""); print}'`
echo "$args"
}
#
# clear_daemon_args $inst_fmri
@@ -208,11 +208,11 @@
# commandline arguments to launch daemons.
#
get_routeadm_property()
{
- propval=`/sbin/routeadm -l $1 | /usr/bin/nawk -v PROP=$2 \
+ propval=`/sbin/routeadm -l $1 | /usr/xpg4/bin/awk -v PROP=$2 \
'($1 == PROP) { for (i = 3; i < NF; i++) printf $i" "; \
if (NF >= 3) {printf $NF}}'`
echo "$propval"
}
@@ -253,14 +253,14 @@
#
get_daemon_ordered_multivalue_option_from_property()
{
# get property values, removing trailing delimiter.
propvals=`get_routeadm_property $1 $2 | \
- /usr/bin/nawk '{sub(/;[ \t]*$/, ""); print }'`
+ /usr/xpg4/bin/awk '{sub(/;[ \t]*$/, ""); print }'`
# Substitute switch for internal delimiters.
fixed_propvals=`/usr/bin/echo $propvals | \
- /usr/bin/nawk -v SWITCH=" -${3} " \
+ /usr/xpg4/bin/awk -v SWITCH=" -${3} " \
'{sub(/;/, SWITCH); print }'`
if [ -n "$fixed_propvals" ]; then
echo "-${3} $fixed_propvals"
fi
}