Sponsored Content
Top Forums Shell Programming and Scripting Check whether the pattern is present or not? Post 302123811 by Shell_Life on Wednesday 27th of June 2007 09:15:09 AM
Old 06-27-2007
Code:
VALUE="(ABC, DEF, NMF, ABC, CLF, PAR, FHG, AGQSAs, sada, sa, ABC)"
mFlag=`echo $VALUE | egrep -c 'ABC|PAR'`
echo "mFlag = "$mFlag

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to check if path is present?

following situation... - bourne shell script - sb. should entry a path and the script should look if the path exists, when not it should restart the Input ... echo "path\c" read Inp if ; then echo " path doesn't exist, try again... " (how to go back to the Inp?????) else echo "... (3 Replies)
Discussion started by: svennie
3 Replies

2. Shell Programming and Scripting

How to check the variable is present in array or not ?

Hi , I am trying to check wether the variable is present in the array. please see the below code .when ever i do this its taking only the first value of the array . please advise. ###Code Snnipet ### #!/bin/ksh set -xv if ]; then echo " you have Specified the ORG ID - $1 " ... (1 Reply)
Discussion started by: padhu.47
1 Replies

3. Shell Programming and Scripting

check whether 3 files are present

I'm trying to check whether 3 files are existing and send 3 files as attachements. If only two are there then send those two files as attachments. if ; then elif ; then I tired the above given syntax and then it is giving me an error line 11: ' I tried with -a instead of && and... (3 Replies)
Discussion started by: Celvin VK
3 Replies

4. Shell Programming and Scripting

How to Check whether list file present in TXT file exist or not

Hi All, I have txt file which has list of files. I have to check whether these files exist or not. Thanks supriya (6 Replies)
Discussion started by: supriyabv
6 Replies

5. Shell Programming and Scripting

search pattern present in second field

Hi All, I have a file with following list. example 1 ======== cat 1.txt -------- 0000cab4752c 0000dab47c2c ... ... ... Also i have another file 2.txt in which the data is in this format as shown: cat 2.txt ---------... (6 Replies)
Discussion started by: imas
6 Replies

6. Shell Programming and Scripting

Check if file is present using input from another file

Hello, I have a comma delimited file such as: cat /statistics/support/input.txt ID,Serial,quantitity,atribute1,atribute2 1,89569698,5,800,9900, 1,35568658,8,1200,5550 1,89569698,8,320,5500 1,68753584,85,450,200 ID should always have 1 digit, Serial 8 digits, and the others may... (2 Replies)
Discussion started by: alex2005
2 Replies

7. Shell Programming and Scripting

sed command to grep multiple pattern present in single line and delete that line

here is what i want to achieve.. i have a file with below contents cat fileName blah blah blah . .DROP this REJECT that . --sport 7800 -j REJECT --reject-with icmp-port-unreachable --dport 7800 -j REJECT --reject-with icmp-port-unreachable . . . more blah blah blah --dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies

8. Shell Programming and Scripting

How to remove content present in between specific pattern ?

Hi, I have a file with following pattern. We are looking to filter out only specific content from this file. sample BLAdmins Server.* LinuxAdmins Server.* Policy Name: Recommended Default ACL Policy Everyone ACLPushJob.Read Everyone ACLTemplate.Read Everyone ... (9 Replies)
Discussion started by: Litu19
9 Replies

9. UNIX for Beginners Questions & Answers

UNIX script to append multiple text files into one file based on pattern present in filaname

Hi All-I am new to Unix , I need to write a script. Can someone help me with a requirement where I have list of files in a directory, I want to Merge the files if a pattern of string matches in filenames? AAAL_555A_ORANGE1_F190404.TXT AAAL_555A_ORANGE2_F190404.TXT AAAL_555A_ORANGE3_F190404.TXT... (6 Replies)
Discussion started by: Shankar455
6 Replies
PAR::Filter::Bytecode(3)				User Contributed Perl Documentation				  PAR::Filter::Bytecode(3)

NAME
PAR::Filter::Bytecode - Bytecode filter SYNOPSIS
PAR::Filter::Bytecode->apply($code); # transforms $code DESCRIPTION
This filter is deprecated. The B::Bytecode code has been removed from the newest development series of perl and will not be included in perl 5.10 any more. Please have a look at Steve Hay's PAR::Filter::Crypto module if you want to hide your sources. This filter uses B::Bytecode to turn the script into comment-free, architecture-specific Perl bytecode, and uses ByteLoader to load back on execution. For pp users, please add an extra -M option, like this: pp -f Bytecode -M ByteLoader Otherwise, the implicit dependency on ByteLoader will not be detected. CAVEATS
This backend exhibits all bugs listed in B::Bytecode, and then some. Bytecode support is considered to be extremely fragile on Perl versions earlier than 5.8.1, and is still far from robust (as of this writing). Bytecode is not supported by perl 5.9 and later. SEE ALSO
PAR::Filter, B::Bytecode, ByteLoader Filter::Crypto, PAR::Filter::Crypto AUTHORS
Audrey Tang <cpan@audreyt.org> <http://par.perl.org/> is the official PAR website. You can write to the mailing list at <par@perl.org>, or send an empty mail to <par-subscribe@perl.org> to participate in the discussion. Please submit bug reports to <bug-par@rt.cpan.org>. COPYRIGHT
Copyright 2003-2009 by Audrey Tang <cpan@audreyt.org>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See <http://www.perl.com/perl/misc/Artistic.html> perl v5.18.2 2012-01-06 PAR::Filter::Bytecode(3)
All times are GMT -4. The time now is 09:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy