10-19-2007
Can't you run the regexp inside a loop and catch all of them?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Is there a way I can extract my data faster. You know my data is 1.2 GB text file with 8Million rows with 38 columns/fields. Imagine how huge this is.
How I can optimized the data extraction using perl. That is why I'm creating a script to filter only those informations that I need. Is... (3 Replies)
Discussion started by: pinpe
3 Replies
2. Shell Programming and Scripting
Hi all,
I have a data file from which i would like to extract only certain fields, which are not adjacent to each other. Following is the format of data file (data.txt) that i have, which has about 6 fields delimited by "|"
HARRIS|23|IT|PROGRAMMER|CHICAGO|EMP
JOHN|35|IT|JAVA|NY|CON... (2 Replies)
Discussion started by: harris2107
2 Replies
3. Shell Programming and Scripting
I have a string stored in a variable. For instance,
$str = " Opcode called is : CM_OP_xxx "
where xxx changes dynamically and can be either LOGIN or SEARCH..... depends on runtime.
For example :
$str = " Opcode called is : CM_OP_SEARCH "
$str = " Opcode called is : CM_OP_LOGIN "
I... (3 Replies)
Discussion started by: vkca
3 Replies
4. Shell Programming and Scripting
The log file reads as follows.
D function_add() ADD input data 1021214
0 VAR1 STR 10
0 VAR2 STR 20
0 VAR3 STR
1 SUM=VAR1+VAR2
D function_add() ADD output data 1021267
0 DISPLAY SUM
D function_sub() SUB input data 1021214
0 VAR1 STR 10
0 VAR2 STR 20
0 VAR3 STR
1 sub=VAR1-VAR2
D... (2 Replies)
Discussion started by: vkca
2 Replies
5. Shell Programming and Scripting
the log contains mathematical operation as follows
fm_void_mathematics : PCM_OP_MATHS input function
PIN_FLD_NUM1 INT 1
PIN_FLD_NUM2 INT 2
PIN_FLD_RESULTS int
PIN_FLD_OUT INT *
D Wed Sep 16 05:40:22 2009 solaris_testing
fm_void_add :
PIN_FLD_SUM int 3
D Wed Sep 16 05:40:22 2009... (1 Reply)
Discussion started by: vkca
1 Replies
6. Shell Programming and Scripting
I have following input
@xxxxxx@
I want to extract what's between @....@ that is : xxxx
using SED command (6 Replies)
Discussion started by: xerox
6 Replies
7. Shell Programming and Scripting
HI,
i have variable in perl like below
$tmp="/home/sai/automation/work/TFP_GN.txt"
it can conatain any path its filled from config file.
now i want extarct the path upto this /home/sai/automation/work/ and put it in another variable
say... (4 Replies)
Discussion started by: raghavendra.nsn
4 Replies
8. Shell Programming and Scripting
Hello,
I want to extract the words from a file which starts with SRD-R or SRD-DR.
I have written a script which is able to trace the word but it is printing the whole line.
sub extract_SRD_tag{
my ($tag, $app, $path, @data, $word );
$path = shift;
$app = shift;
open (FILE, $path) or... (2 Replies)
Discussion started by: suvendu4urs
2 Replies
9. Shell Programming and Scripting
Hi,
I am using the following code to retrieve the contents between C-style comments "/* .. */".
perl -lne 'while(/(\/\*.*?\*\/)/g) {print "$1";}'
This works fine when the commented section of code is present in a single line. But I also need to extract the data which is present inside... (3 Replies)
Discussion started by: royalibrahim
3 Replies
10. Shell Programming and Scripting
Hi, I need to extract Password expires from the output of windows command print `net user %USERNAME% /domain`; in perl. So i want to redirect the output of this win-cmd to a file and try extracting Password expires along with its value. i'm trying with this code but getting errors.
#!usr/bin/perl... (1 Reply)
Discussion started by: sam_bd
1 Replies
LEARN ABOUT FREEBSD
fnmatch
FNMATCH(3) BSD Library Functions Manual FNMATCH(3)
NAME
fnmatch -- test whether a filename or pathname matches a shell-style pattern
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <fnmatch.h>
int
fnmatch(const char *pattern, const char *string, int flags);
DESCRIPTION
The fnmatch() function matches patterns according to the rules used by the shell. It checks the string specified by the string argument to
see if it matches the pattern specified by the pattern argument.
The flags argument modifies the interpretation of pattern and string. The value of flags is the bitwise inclusive OR of any of the following
constants, which are defined in the include file <fnmatch.h>.
FNM_NOESCAPE Normally, every occurrence of a backslash ('') followed by a character in pattern is replaced by that character. This is done
to negate any special meaning for the character. If the FNM_NOESCAPE flag is set, a backslash character is treated as an ordi-
nary character.
FNM_PATHNAME Slash characters in string must be explicitly matched by slashes in pattern. If this flag is not set, then slashes are treated
as regular characters.
FNM_PERIOD Leading periods in string must be explicitly matched by periods in pattern. If this flag is not set, then leading periods are
treated as regular characters. The definition of ``leading'' is related to the specification of FNM_PATHNAME. A period is
always ``leading'' if it is the first character in string. Additionally, if FNM_PATHNAME is set, a period is leading if it
immediately follows a slash.
FNM_LEADING_DIR
Ignore ``/*'' rest after successful pattern matching.
FNM_CASEFOLD Ignore case distinctions in both the pattern and the string.
RETURN VALUES
The fnmatch() function returns zero if string matches the pattern specified by pattern, otherwise, it returns the value FNM_NOMATCH.
SEE ALSO
sh(1), glob(3), regex(3)
STANDARDS
The current implementation of the fnmatch() function does not conform to IEEE Std 1003.2 (``POSIX.2''). Collating symbol expressions, equiv-
alence class expressions and character class expressions are not supported.
HISTORY
The fnmatch() function first appeared in 4.4BSD.
BUGS
The pattern '*' matches the empty string, even if FNM_PATHNAME is specified.
BSD
July 18, 2004 BSD