Search Results

Search: Posts Made By: ahfze
2,770
Posted By RudiC
Would this come close? grep -offile1 file2 |...
Would this come close?

grep -offile1 file2 | sort | uniq -c
2 god
1 pod
2 rod

--- Post updated at 16:24 ---

Hoppla - didn't take your thread title into account. Try this...
606
Posted By RudiC
I don't know if you can do it with a single...
I don't know if you can do it with a single grepand a perl-like "look ahead" / "look behind" match. You can do it with two greps, though (or use perl or awk or similar):grep -o "[>].*[<]" file | grep...
2,374
Posted By RudiC
Closest I can get quickly: while read line; do...
Closest I can get quickly:
while read line; do echo "^$line"; done <file2 | grep -of- file1 | sort | uniq -c
1 first
2 second
while read line; do echo "$line\$"; done <file2 | grep...
1,280
Posted By abdulbadii
@ahfze .. cause you said firstly in example, word...
@ahfze .. cause you said firstly in example, word is at first line, then differ it. Sed not works, use grep PCRE regex instead:

$ echo 'A circumferential abdominoplasty is an extended...
Showing results 1 to 4 of 4

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