Search Results

Search: Posts Made By: stresing
10,873
Posted By wbport
grep is going to show the whole line unless the c...
grep is going to show the whole line unless the c or s option is used. You could used sed to insert escape sequences around your searched for term to make the first one stand out (apply a color or...
10,873
Posted By RudiC
How about awk ' NR == FNR {SRCH = SRCH...
How about
awk '
NR == FNR {SRCH = SRCH DL $0
DL = "|"
next
}
match ($0, SRCH){print substr ($0, RSTART, RLENGTH)
}
'...
10,304
Posted By drl
Hi. There is a code, peg, that may do what...
Hi.

There is a code, peg, that may do what you desire: multiple patterns of PERLRE expressions. Using the pattern from disedorgue and an augmented data file, a demo is:
#!/usr/bin/env bash

#...
10,304
Posted By Corona688
Well, if you're rewriting from scratch anyway,...
Well, if you're rewriting from scratch anyway, you could have a file full of awk expressions, like:

# Do NOT print line if this regex matches
/regex1/ { next }

# print line if it contains this...
10,304
Posted By Corona688
Greedy matching is doing you in. All...
Greedy matching is doing you in. All "(?!foobuzz)..." needs to find is one spot before user1 which doesn't start in 'f' and its condition is satisfied. The .* after it swallows everything. So it...
10,304
Posted By disedorgue
Hi, with grep: $ cat gr.txt 2015-04-08...
Hi, with grep:
$ cat gr.txt
2015-04-08 19:04:55,926|xxxxxxxxxx| |foobar| |INFO |REQUEST|UserID1:42 | yeah
2015-04-08 19:04:56,157|yyyyyyyyyy| |foobuzz| |INFO...
3,478
Posted By bakunin
With files that big performance considerations...
With files that big performance considerations are perhaps vital, so take the following with a grain of salt. I have no file that big to test it.

Instead of using "-f <file>" to read the file...
2,023
Posted By ahamed101
Try this... ./output.sh | xargs ./input.sh ...
Try this...

./output.sh | xargs ./input.sh


--ahamed
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 09:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy