![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Piping Question | mtobin1987 | High Level Programming | 2 | 04-25-2008 11:24 PM |
| Piping in UNIX | simo007 | UNIX for Dummies Questions & Answers | 3 | 05-23-2007 02:40 AM |
| Help with piping program | PuppyHusher | High Level Programming | 3 | 03-30-2007 12:26 PM |
| piping | lnatz | Shell Programming and Scripting | 1 | 07-14-2006 02:30 AM |
| Help (Piping ls, tr, cut) | scan | Shell Programming and Scripting | 2 | 02-11-2006 08:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Piping in Perl
Hi All,
I am trying to perform the below csh code in Perl, but i am unfamiliar with Perl. Can anybody give me some advice on it ? Csh Code: Code:
cat filename |grep AAA| grep BBB| awk '{print("already_appended")'
|
|
||||
|
Hi sysgate,
Think if($string =~ m/(AAA|BBB|CCC)/) is an OR function. In short, the purpose of the below csh shell actually grabs the lines which contain both the term AAAand BBB. However, the Perl code which you showed me will only grab those lines containing either AAA or BBB or both. Can anybody give me some advice ? Was wondering if the below Perl code can work ? Code:
if($_ =~ "AAA" && $_ =~ "BBB" )
{print "We've got a match!\n"}
|