asdfads

test scripts
Started by Rob Donovan, Jan 16 2006 06:16 PM
2 replies to this topic
#1
Posted 16 January 2006 - 06:16 PM
#2
Posted 16 January 2006 - 06:17 PM
In Unix, use the fuser command...
Here is a example...
Here is a example...
tmp=/tmp/"$LOGNAME".usg user=$LOGNAME if [ ! "$1" = "" ]; then user=$1 fi for file in `ls` do fuser -u $file >>$tmp 2>$tmp # cat $tmp fi=`grep $user $tmp | wc -l` fi=`echo $fi` if [ ! "$fi" = "0" ]; then echo ok - $file fi done rm $tmp
#3
Posted 16 January 2006 - 06:17 PM
In Unix, use the fuser command...
Here is a example...
tmp=/tmp/"$LOGNAME".usg
user=$LOGNAME
if [ ! "$1" = "" ]; then
user=$1
fi
for file in `ls`
do
fuser -u $file >>$tmp 2>$tmp
# cat $tmp
fi=`grep $user $tmp | wc -l`
fi=`echo $fi`
if [ ! "$fi" = "0" ]; then
echo ok - $file
fi
done
rm $tmp
Here is a example...
tmp=/tmp/"$LOGNAME".usg
user=$LOGNAME
if [ ! "$1" = "" ]; then
user=$1
fi
for file in `ls`
do
fuser -u $file >>$tmp 2>$tmp
# cat $tmp
fi=`grep $user $tmp | wc -l`
fi=`echo $fi`
if [ ! "$fi" = "0" ]; then
echo ok - $file
fi
done
rm $tmp
Reply to this topic

0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users