#! /bin/sh # PCP QA Test No. 570 # pmnscomp -f /dev/null et al, #690735 # # Copyright (c) 1995-2002 Silicon Graphics, Inc. All Rights Reserved. # seq=`basename $0` echo "QA output created by $seq" # get standard environment, filters and checks . ./common.product . ./common.filter . ./common.check rm -f $seq.out if [ $PCP_VER -lt 3051 ] then ln $seq.out.1 $seq.out elif [ $PCP_VER -lt 3600 ] then ln $seq.out.2 $seq.out else _notrun "pmnscomp retired in PCP 3.6" fi status=1 # failure is the default! trap "cd $here; rm -rf $tmp; exit \$status" 0 1 2 3 15 _ls() { if [ -r $1 -o -w $1 -o -x $1 ] ; then # filter ls -ld output #-rwxr-xr-x 1 kenmcd ptg 2386 Apr 29 04:52 570 #drwxrwxr-x 13 kenmcd ptg 52736 Apr 29 04:33 . #crw-rw-rw- 1 root sys 1, 2 Apr 29 04:57 /dev/null #Cannot access nofile: No such file or directory LC_TIME=POSIX ls -ld $1 \ | sed \ -e 's/-rw-r--r--\./-rw-r--r--/' \ -e 's/crw-rw-rw-\./crw-rw-rw-/' \ -e 's/drwxr-xr-x\./drwxr-xr-x/' \ | $PCP_AWK_PROG ' NF == 9 && /^-/ { print $1,"...",$5,"...",$9; next } NF == 9 && /^d/ { print $1,"...",$9; next } NF == 10 && /^[cb]/ { print $1,"...",$10; next } { print }' else echo "Cannot access $1: No such file or directory" fi } umask 022 rm -rf $tmp mkdir $tmp chmod 755 $tmp cd $tmp cat >pmns <pmns.dup pmnscomp -n pmns.dup -f root.bin _ls root.bin rm -rf root.bin echo "and again with -d" pmnscomp -n pmns.dup -f -d root.bin _ls root.bin rm -rf root.bin # success, all done status=0 exit