
September 18th, 2003, 03:57 PM
|
|
Junior Member
|
|
Join Date: Sep 2003
Location: Park Ridge, IL.
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
KSH Help
I need to omit binary files from a ksh script. I want to pass $VAR to ls which will pipe to grep, here are the two chunks of code I'm trying to write together, the top part doesn't work and I need help...
$LOGS=/mydir
for NONEXEC in `ls -a1 $LOGS/*`
do EXEC1=`file $NONEXEC | grep executable | grep -v script | awk '{ print }'`
done
for DIR in `ls -d $LOGS/* | grep -v image | grep -v wilson | grep -v compare | grep -v refdb`
do
if [[ ! -d $DIR ]]
then
continue
fi
|