The -eq test is used to compare integer values. Use (as you did for your first comparison) the = operator to compare string values. Note that bash arguments are strings, so , even if $2 is numeric, the = test should work. Note also that /, by itself, is a string, not an integer.
<edit>
Note also that this question would have been more appropriate tin the "programming" section.
</edit>
Last edited by PTrenholme; 10-18-2010 at 01:23 PM.
|