.sh & getopts
cyberleo at cyberleo.net
Sun Jun 6 04:40:24 UTC 2010
On 06/05/2010 10:56 PM, Aiza wrote:
> i) action="installworld"; $flag_count=$((flag_count+1));;
> What is still wrong here
Bourne shell expands variables to their contents before evaluating.
Thus, the above assignment ends up expanding to '0=1'. Leave out the $
on the target variable, and it becomes 'flag_count=1', which is more
likely what you intended.
The other syntax does make for some pretty nifty hacks, though.
<CyberLeo at CyberLeo.Net>
Furry Peace! - http://wwww.fur.com/peace/
More information about the freebsd-questions