[plug] Shell Scripting Confusion
Christian
christian at global.net.au
Wed Feb 9 12:06:37 WST 2000
Hi,
I'm almost a complete novice at shell scripting as this email will
probably show but I'm starting to get very confused...
Using Debian's checkrhosts program:
eagle:~/src# checkrhosts
eagle:~/src#
eagle:~/src# cat test.sh
#!/bin/sh
output=`checkrhosts`
if [ -n $output ]; then
echo "Length is greater than zero"
else
echo "Length is not greater than zero"
fi
eagle:~/src# ./test.sh
Length is greater than zero
eagle:~/src# perl -e '
$output = `checkrhosts`;
print length $output, "\n";
'
0
eagle:~/src#
So what am I doing wrong?
Regards,
Christian.
More information about the plug
mailing list