WDef

Group: Members
Posts: 798
Joined: Sep. 2005 |
 |
Posted: Nov. 02 2006,12:22 |
 |
One thing that's nice about this type of thread is how different users get deep into their particular issues on dsl, then provide a resource for the rest of us by posting. If I feel the urge to fiddle with some of this stuff , Mikshaw's already done the work for us - all I have to do is find it on the forum.
PS: I like case statements, too. I find them readable. Globbing in them can be handy also. For eg, Karl Knopper uses this type of thing a lot to test for a string within a string:
Code Sample | case $STRING in *$PATTERN* ) do_something;; *) do_something_else;; esac |
or something like that. This runs much faster than doing
Code Sample | if echo $STRING | grep -q $PATTERN; then |
which can be slow.
|