I was wondering how I can do the following with sed (or another program):
How's Perl, Daniela?
1. Output only the text from the start of the line to the first pipe character
$out = ($line =~ /^([^\|]+)/);
2. Output only the text between the last and the previous pipe character
$out = ($line =~ /\|([^\|]+)|/);
Or, split the line at the pipe characters and assign the parts to different shell variables.
my @ary = split '|', $line;
These are untested but probably pretty close at least. Sorry, I haven't gotten to shell scripting yet so I think in terms of Perl.
Marty Landman Face 2 Interface Inc 845-679-9387 This Month's New Quiz --- Past Superbowl Winners Make a Website: http://face2interface.com/Home/Demo.shtml
_______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"