[ale] Bash script question

Geoffrey esoteric at 3times25.net
Thu May 15 08:37:41 EDT 2003


Christopher Fowler wrote:
> The problem is that bash isn't really made for this type of work.
> 
> 
>>>comma_count=$(echo $line | tr -cd , | wc -c)
> 
> 
> Sure, it may work above, but you are relying on external
> programs such as tr and wc to do some work for you.  Nothing
> I can tink of internal to bash will do this for you.  I've
> ran into problems of compatibility issues in the past using
> external commands to process strings.

I would think it would be highly unlikely to find an OS that contains a 
bourne shell equivalent shell (like bash) that did not have both tr and 
wc.  I would include sed, awk and a number of other tools as well.


-- 
Until later: Geoffrey		esoteric at 3times25.net

The latest, most widespread virus?  Microsoft end user agreement.
Think about it...

_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list