On Thu, 1 Feb 2001, Anthony Capone wrote:
> I would like awk to search for the pattern: / at the beginning of the
> line, followed by any number of characters, followed by :
You can do this lots of ways, using perl, bash 2.x, awk, sed, or some
combination of these. The trick is to understand regular expressions
(O'Reilly has a great book on the subject).
The following will work, assuming that you don't have colons anywhere else
in your input stream:
egrep '^/' | sed 's/:.*$/:/'
You might consider subscribing to the shell.scripting mailing list at
www.moongroup.com for deeper discussions of scripting issues. As for
regular expressions, they're like Othello: minutes to learn, a lifetime to
master.:)
--
Todd A. Jacobs
Senior Network Consultant
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list