[KLUG Programming] Re: [KLUG Members] getting exit code in
bash script
bill
bill at billtron.com
Fri Mar 11 15:16:21 EST 2005
Bruce,
The problem does not seem to be in my gedit.
After some testing couldn't duplicate it, I ran some tests on your
original script.
It seems that the weird character(s)
$'\302\240'
is in your original post:
#!/bin/sh
somecommand
exitcode=$?
if [ $exitcode -eq 0 ]
then
echo "Everything is O.K."
else
echo the exit code for somecommand was: $exitcode
fi
When I save that snippet of code to a file (oddchar.txt) and then run
cat oddchar.txt | grep $'\302\240'
Every indented line shows the odd char.
Are you really sure you could run the version of the script you put in
the email?
Any idea what the weird character is?
b.
More information about the Programming
mailing list