Sponsored Content
Top Forums Shell Programming and Scripting egrep help required to find pattern Post 302514831 by Franklin52 on Monday 18th of April 2011 08:15:53 AM
Old 04-18-2011
Another one:
Code:
awk '/--/;/\/\*/{p=1};p;/\*\//{p=0}' file

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

egrep a certain pattern

hey guys this is my first post here, heard a lot about these forums. Iam urgently in need of a command which would help me accomplish the following , for example a file has these contents: 211 61 2007-06-26 13:47:32 211 61 2007-06-26 09:53:43 211 61 2007-06-26 15:25:14 211 61 2007-06-26... (5 Replies)
Discussion started by: trust123
5 Replies

2. Shell Programming and Scripting

HOW to egrep fo a pattern

Hi, I want to use egrep to match this expression in my file. The expression begins with the word SCHEDULE and ends with PFTDGNIN. In between these 2 words there can be anything. EX: Line1: SCHEDULE NWERRR#PFTDGNIN Line2: FOLLOWS NWD@AAS#PFTDGNIN So as a result of the egrep command... (1 Reply)
Discussion started by: eliewadi
1 Replies

3. UNIX for Advanced & Expert Users

Urgent Help required : awk/sed help to find pattern and delete till end of line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies

4. Shell Programming and Scripting

Simple egrep pattern

I'm new to egrep. What pattern could I use to find all lines that match this pattern: <beginning of line><any amount of whitespace>sub<space>. I want it to return the entire line. (I'm trying to generate a list of all Perl sub definitions in a list of Perl modules.) Thanks for your help! (7 Replies)
Discussion started by: blondie53403
7 Replies

5. Shell Programming and Scripting

grep/egrep end of pattern

Hi I use arp to get the mac-addresses of my hosts. # arp -a | grep 192.168.0. e1000g0 192.168.0.1 255.255.255.255 o 00:00:00:00:00:01 e1000g0 192.168.0.11 255.255.255.255 o 00:00:00:00:00:02 e1000g0 192.168.0.2 255.255.255.255 ... (12 Replies)
Discussion started by: domi55
12 Replies

6. Shell Programming and Scripting

How to egrep multiple pattern

Hi everyone i want to write a script to grep multiple pattern from all the file from a dir. for example I want to get all the record number from XML file who's last name is asd, smith, dfrt,gokul,and sinha. I tried egrep('sinha'|'gokul'|'asd') but it is not working also i tried saving... (2 Replies)
Discussion started by: revertback
2 Replies

7. Shell Programming and Scripting

egrep - Help Required

HI, I have a piece of code which checks the return value for a pattern "Status: 0000" like this - returnval=<<some op>> echo $returnval | egrep "\bStatus:\s+" if ; then echo "Failed" fi Even on success or failure i get $? = 1 i.e. it never passes ? (16 Replies)
Discussion started by: angshuman_ag
16 Replies

8. Shell Programming and Scripting

Find required files by pattern in xml files and the change the pattern on Linux

Hello, I need to find all *.xml files that matched by pattern on Linux. I need to have written the file name on the screen and then change the pattern in the file just was found. For instance. I can start the script with arguments for keyword and for value, i.e script.sh keyword... (1 Reply)
Discussion started by: yart
1 Replies

9. Shell Programming and Scripting

Help required to find pattern

Hi All, I have a oracle code & want to exclude the comments present in the code. Below may be the pattern can be considered for eg. -- ALTER TABLE ALTER TABLE -- To create In above sample, First line is full commented line as it starts with "--" Wheras the second line is starting... (2 Replies)
Discussion started by: gr8_usk
2 Replies

10. Shell Programming and Scripting

EGREP pattern advice

Hi, I need advice on a simiple pattern check, Orginal Code bpimagelist -backupid xxxxxxxxxxxxx | grep "FRAG " | egrep -i "C5|W5" | awk 'NR==1{print $2,$9} 1 MAC514 What i want is to find any media beinging with C5|W5. I have tried ^C5|^W5, but this does not work. Removed... (3 Replies)
Discussion started by: Junes
3 Replies
Locale::Script(3perl)					 Perl Programmers Reference Guide				     Locale::Script(3perl)

NAME
Locale::Script - standard codes for script identification SYNOPSIS
use Locale::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. The ones currently supported are: alpha This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_ALPHA". The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. numeric This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_NUMERIC". ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Script::delete_script ( CODE [,CODESET] ) Locale::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Script::delete_script_alias ( NAME ) Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes man page. SEE ALSO
Locale::Codes Locale::Constants http://www.unicode.org/iso15924/ Home page for ISO 15924. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2011 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-26 Locale::Script(3perl)
All times are GMT -4. The time now is 09:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy