[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Testing for null positional parameters.
Hello Everyone,
In on of my first forays into writing a shell script, I have run into
a problem. I cannot find how to work this and would like some help.
I am writing a script that I will use to sort files, sometime making
hard links in multiple directories. That part that I'm stuck on is
the subject of this message, testing for null positional parameters.
if
test $n "is not null" (where n is the number of the position)
then
command
fi
I realize that this may not be the most elegant way, but hey! I'm
learning.