I have a script which looks something like
Now I want to pass the exceptions as parameters. The best I can think of is
I hate using temporary variables (doit) and there must be a better way. Any suggestions?
Thanks
On the internet no one knows you're a dog
Columb Healy
Code:
#!/bin/ksh
for file in *
do
# Skip known exceptions
[[ $file = this ]] && continue
[[ $file = that ]] && continue
[[ $file = other ]] && continue
process_file $file
done
Code:
#!/bin/ksh
for file in *
do
doit=TRUE
for exception in $@
do
[[ $file = $exception ]] && doit=FALSE
done
[[ $doit = TRUE ]] && process_file $file
done
Thanks
On the internet no one knows you're a dog
Columb Healy