[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Bash script question
- Subject: [ale] Bash script question
- From: esoteric at 3times25.net (Geoffrey)
- Date: Thu, 15 May 2003 08:37:41 -0400
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