10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need to egrep patterns in a file and limit number of matches to print for each matched pattern.
-m10 option is not working out in my sun solaris 5.10
Please guide me the options to achieve.
if i do head -10 , i wont be getting all pattern match results as output since for a... (10 Replies)
Discussion started by: ananan
10 Replies
2. Shell Programming and Scripting
Hello,
I have a large CSV file that contains values all on the same column, and in one very long row (e.g. no line breaks till end, with all data values separated by a comma).
The file has two types of data for the values. One begins with the letters rs and some numbers. The other begins... (4 Replies)
Discussion started by: macurdy
4 Replies
3. Shell Programming and Scripting
I have an array with characters, what I want is if there are other characters in the array which I am looking for than take action that is print BAD ARRAY. So far my code just finds characters but instead I want that it should look for other characters.
echo "A B C D F" | egrep -o "D | F"
O/P... (5 Replies)
Discussion started by: dixits
5 Replies
4. Shell Programming and Scripting
Hi All,
I am new to awk command and I had a question in using it.
I want to filter a code file and print specific functions (that contain menu word in the function name).
for example, if the file has:
function menu1()
{
}
function f2()
{
}
function menu3()
{
}so I want... (5 Replies)
Discussion started by: ghoda2_10
5 Replies
5. Shell Programming and Scripting
Dear Friends,
I have a command which can result following output.
Packet is: /var/adm/yyyy/pkt6043
Intended for network : /vob/repo
I would like to retrive
pkt6043 and /vob/repo using single command.
Blue color test will be always contstant and red color text will be dynamic
... (2 Replies)
Discussion started by: baluchen
2 Replies
6. Shell Programming and Scripting
Hi experts.
In one thread i have asked you how to grep the string from the below sample file-
Unfortunately the script did not gave proper output (it missed many strings). It happened may be i did gave you the proper contents of the file
That was the script-
"$ perl -00nle'print join... (13 Replies)
Discussion started by: thepurple
13 Replies
7. UNIX for Dummies Questions & Answers
Ok, this may be very simple but I can't find a solution. I have a list of numbered values which I have grepped from a larger life.
ex/
1:7.54
2:4.52
3:3.22
4:2.11
5:3.59
6:4.36
7:6.88
8:12.28
9:13.37
10:15.6
11:17.66
12:14.25
I need a quick way to organize them (using awk?)... (4 Replies)
Discussion started by: jdolny
4 Replies
8. UNIX for Dummies Questions & Answers
Hi I've been searching google and have not found what egrep -c means. Does anyone know where I can get a cheat sheet or what that -c means?
thanks,
Linda (2 Replies)
Discussion started by: leelm
2 Replies
9. AIX
Hi,
I'm new to scripting and AIX. I'm running the following:
lspv | awk '{ print "lspv",$1" | egrep 'PP\|PHYSICAL'; lspv -l",$1 }'
Which creates this command:
lspv hdisk0 | egrep PP|PHYSICAL; lspv -l hdisk0
lspv hdisk1 | egrep PP|PHYSICAL; lspv -l hdisk1
Troube is, I need the... (2 Replies)
Discussion started by: cruiser
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
The input file "notifications" contains the following string.
FRTP has 149 missing batches
I want to search for :
FRTP has missing batches
As the number 149 is not important and will change.
The commands I have tried.
grep "FRTP has.*missing batches" notifications.txt... (3 Replies)
Discussion started by: whugo
3 Replies