
August 6th, 2003, 01:39 AM
|
 |
Contributing User
|
|
Join Date: Aug 2003
Location: under a rock
Posts: 54
Time spent in forums: 11 h 20 m 42 sec
Reputation Power: 10
|
|
|
grep problems
I like the korn shell too.
I'd figure out what results you expect from
grep -c '^[a-zA-Z]$' "$mins"
...and then assign that to a variable, and THEN compare it in your if statement. One thing that helps me greatly when I'm having a problem is simplifying down to one step at a time (heh... not just shell scripting either).
Also, put a line at the beginning of a troubled section like this:
set -x
...and at the end of that section,
set +x
they enable and disable debugging feedback, another very useful thing to have in your toolbox.
Cheers!
-zedmelon
__________________
Mother says my .sig can beat up your .sig.
|