[ale] I am an idiot

Transam@cavu.com transam at cavu.com
Tue Jun 26 19:49:06 EDT 2001


I've been fond of the sed command for string manipulation.  You can give
one sed multiple commands to do in sequence.  There also is awk.  Both of
these are pretty standard in the Linux/Unix world, except that some have
the "Berkeley" extensions for matching the beginning or end of a word.

For csh and tcsh users, the "s" command has the same syntax but no
wildcard capability and works without forking a subprocess.

Bob Toxen
transam at cavu.com                       [Bob's ALE Bulk email]
bob at cavu.com

"Jason Lynn" <jason_lynn_ at hotmail.com> wrote:

> I need some way to do some basic string manipulation that works both for 
> Linux and Solaris (out of the box).  I basically need to take a string like 
> "hello|goodbye" and split that string into two components, hello and goodbye 
> (assign them to shell variables, etc.) by a delimeter such as '|'.  I 
> thought everything was going well when I used expr to do just that.  No 
> problems in Linux.  It appears, though, that functions like substr, length, 
> etc are NOT supported in sparc Solaris.  So I looked into awk and sed (for 
> the first time), which only served to piss me off even more.  Can anyone 
> help me with this one?

> Thanks in advance,
> Jason
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list