01-07-2016
Hello gotamp,
Glad that Scrutinizer's solution worked for you. Seems to be you have Solaris OS, it is always good practice to mention your OS details in your posts, you could try awk solution too which I have posted in POST#2. But on a Solaris/SunOS system, change awk to /usr/xpg4/bin/awk , /usr/xpg6/bin/awk, or nawk.
Thanks,
R. Singh
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'd like to grep a pattern of a version number as
*_number.number.number
number should be digit
my grep is
|egrep '^*++\.+'
It works for V_3.2.1 or V _5.3.2 but not with V_43.6.543 !!!!!
How can I specify any repetition of digit in the ?
thanks, (4 Replies)
Discussion started by: annelisa
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Can I know the usage of fgrep -f command in kshell.
Reqirement: Need to search for list of patterns in list of files and display all the files which are having atleast one in the patterns list.
I hope fgrep -f will serve this purpose within a loop. But I am not successfull in doing this.... (0 Replies)
Discussion started by: divv
0 Replies
3. UNIX Desktop Questions & Answers
Hi All,
Can anyone please explain me the difference between grep, egrep and fgrep with examples.
I am new to unix environment.. Your help is highly appreciated.
Regards,
ravi (2 Replies)
Discussion started by: ravind27
2 Replies
4. Shell Programming and Scripting
Hi All,
I am using egrep command to search one pattern. Following is the command i am using
egrep -i "ACL*" filename
but its also giving me the records which do not contain ACL.
any help would be appreciated.
Regards,
Sam (3 Replies)
Discussion started by: sam25
3 Replies
5. Shell Programming and Scripting
How can we use fgrep command to search pattern on perticular field on a file.
eg : I have a parren file having format
cat patternfile
SPA16S199982
SPA5S26330
I want to seach these pattern on FIRST field of File2(since other field has
same data) and that too maching entirely.
... (10 Replies)
Discussion started by: morbid_angel
10 Replies
6. Shell Programming and Scripting
All,
I have a problem with grep/fgrep/egrep. Basically I am building a 200 times 200 correlation matrix. The entries of this matrix need to be retrieved from another very large matrix (~100G). I tried to use the grep/fgrep/egrep to locate each entry and put them into one file. It looks very... (1 Reply)
Discussion started by: realwindfly
1 Replies
7. Shell Programming and Scripting
Hi,
i am using fgrep command with following syntax
fgrep -v -f pattern_file_name file
file contains few line and have the pattern which i am giving in pattern file.
My Problem is :
its is not giving any output.
while i am using fgrep -f pattern_file_name file
it is showing all... (4 Replies)
Discussion started by: emresearch
4 Replies
8. Shell Programming and Scripting
cat /tmp/inventory.csv|grep AARP|egrep -v "T11|12.4\(7\)"
how do i exclude in addition to above 12.4\(3\)
I have tried adding this in i.e
-v "T11|12.4\(7\)|12.4\(3\)"
but it did not work (3 Replies)
Discussion started by: slashbash
3 Replies
9. Shell Programming and Scripting
Hello folks,
Here's how my current egrep command works:
egrep "NY|DC|LA|VA|MD" state_data.txt
I am planning to use a file to enter all allowable state values like say a new state_names.lookup with the following data:
NY
DC
LA
VA
MD
egrep "`cat state_names.lookup`"... (6 Replies)
Discussion started by: calredd
6 Replies
10. Shell Programming and Scripting
Hi,
I am novice in PERL enviornment. I have a text files withso many entries in rows and columns. I have to pick up entries
named as "Uniprot ID" in the file and create a new text file with list of particular Uniprot ID entries. Can anybody guide regarding this.. I came to know abut fgrep... (1 Reply)
Discussion started by: manigrover
1 Replies