Sponsored Content
Top Forums Shell Programming and Scripting Regular Expression + Aritmetical Expression Post 21688 by irfan_yousuf on Tuesday 21st of May 2002 10:59:56 AM
Old 05-21-2002
yeah if u could be more specific by giving out an example of wht u want to do... i'm sure tht would be good enough to help u out and frankly spking i don't see any problem in wht u want to do... i'm sure it shd be possible
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

regular expression

Hello All! I have a file thats something like this: ( a grep output) /path/of/file/filename.abc.xyz.pqr:! Commented text /path/of/file/filename.abc.xyz: ! More Commented text I need to grep out those line from this file whose filename has ".abc" in the filename (anywhere in filename)... (3 Replies)
Discussion started by: ag79
3 Replies

2. Linux

Regular expression to extract "y" from "abc/x.y.z" .... i need regular expression

Regular expression to extract "y" from "abc/x.y.z" (2 Replies)
Discussion started by: rag84dec
2 Replies

3. UNIX for Dummies Questions & Answers

Regular expression help

HI All, I want to list a file with the below format : testfile_nnnnn.xxxx where n and x can be any digit 0-9. n repeats 5 times and x 4 times... I tried with something like below: ls -l testfile_/\{5\}/* to start with but its not working. Please could anyone help? Thanks D (1 Reply)
Discussion started by: deepakgang
1 Replies

4. Shell Programming and Scripting

Regular expression

Hi I have to extract the first field and the last %field of the following out put.. /home (/abc/def/bhd ) : 522328 total allocated Kb 319448 free allocated Kb ... (2 Replies)
Discussion started by: Harikrishna
2 Replies

5. Shell Programming and Scripting

regular expression (.*?)

hi all, i have a text file with below content ............................... ............................... ............................... ............................... %%Page: (4) 4 %%PageBoundingBox: 34 -30 584 831 %%BeginPageSetup %%BeginFeature: *PageSize A4 595 842... (7 Replies)
Discussion started by: uttamhoode
7 Replies

6. Shell Programming and Scripting

Regular expression Help

Hi What is the meaning of this in regular expression $k =~ s/^\s*//; Plz explain (3 Replies)
Discussion started by: Harikrishna
3 Replies

7. Shell Programming and Scripting

Integer expression expected: with regular expression

CA_RELEASE has a value of 6. I need to check if that this is a numeric value. if not error. source $CA_VERSION_DATA if * ] then echo "CA_RELESE $CA_RELEASE is invalid" exit -1 fi + source /etc/ncgl/ca_version_data ++ CA_PRODUCT_ID=samxts ++ CA_RELEASE=6 ++ CA_WEEK_NO=7 ++... (3 Replies)
Discussion started by: ketkee1985
3 Replies

8. Shell Programming and Scripting

help in regular expression

<ATTR name="ABCDEFGH" value=""/> <ATTR name="HJYR" value=""/> what would be the regular expression to match both the above strings... Always end with value=""/> always start with <ATTR name=" the ATTR name can be anything.. I need to use this with match() in awk. Thanks.. (1 Reply)
Discussion started by: shekhar2010us
1 Replies

9. Programming

Perl: How to read from a file, do regular expression and then replace the found regular expression

Hi all, How am I read a file, find the match regular expression and overwrite to the same files. open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat"; open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat"; while (<DESTINATION_FILE>) { # print... (1 Reply)
Discussion started by: jessy83
1 Replies

10. UNIX for Advanced & Expert Users

sed: -e expression #1, char 0: no previous regular expression

Hello All, I'm trying to extract the lines between two consecutive elements of an array from a file. My array looks like: problem_arr=(PRS111 PRS213 PRS234) j=0 while } ] do k=`expr $j + 1` sed -n "/${problem_arr}/,/${problem_arr}/p" problemid.txt ---some operation goes... (11 Replies)
Discussion started by: InduInduIndu
11 Replies
GREPDIFF(1)							     Man pages							       GREPDIFF(1)

NAME
grepdiff - show files modified by a diff containing a regex SYNOPSIS
grepdiff [[-n] | [--line-number]] [--number-files] [[-p n] | [--strip-match=n]] [--strip=n] [--addprefix=PREFIX] [[-s] | [--status]] [[-i PATTERN] | [--include=PATTERN]] [[-x PATTERN] | [--exclude=PATTERN]] [[-v] | [--verbose]] [[-E] | [--extended-regexp]] [[-H] | [--with-filename]] [[-h] | [--no-filename]] [--output-matching=WHAT] {[REGEX] | [-f FILE]} [file...] grepdiff {[--help] | [--version] | [--list] | [--filter ...]} DESCRIPTION
For each file modified by a patch, if the patch hunk contains the REGEX then the file's name is printed. The regular expression is treated as POSIX Basic Regular Expression syntax, unless the -E option is given in which case POSIX Extended Regular Expression syntax is used. For example, to see the patches in my.patch which contain the regular expression "pf_gfp_mask", use: grepdiff pf_gfp_mask my.patch | xargs -rn1 filterdiff my.patch -i You can use both unified and context format diffs with this program. OPTIONS
-n, --line-number Display the line number that each patch begins at. If verbose output is requested, each matching hunk is listed as well. For a description of the output format see lsdiff(1). --number-files File numbers are listed, beginning at 1, before each filename. -p n, --strip-match=n When matching, ignore the first n components of the pathname. --strip=n Remove the first n components of the pathname before displaying it. --addprefix=PREFIX Prefix the pathname with PREFIX before displaying it. -s Show file additions, modifications and removals. A file addition is indicated by a "+", a removal by a "-", and a modification by a "!". -i PATTERN, --include=PATTERN Include only files matching PATTERN. -x PATTERN --exclude=PATTERN Exclude files matching PATTERN. -E, --extended-regexp Use POSIX Extended Regular Expression syntax. -H, --with-filename Print the name of the patch file containing each match. -h, --no-filename Suppress the name of the patch file containing each match. -f FILE, --file=FILE Read regular expressions from FILE, one per line. --output-matching=hunk|file Display the matching hunk-level or file-level diffs. --help Display a short usage message. --version Display the version number of grepdiff. --filter Behave like filterdiff(1) instead. --list Behave like lsdiff(1) instead. SEE ALSO
filterdiff(1), lsdiff(1) AUTHOR
Tim Waugh <twaugh@redhat.com> Package maintainer patchutils 23 Jan 2009 GREPDIFF(1)
All times are GMT -4. The time now is 12:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy