10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I've written an awk script to compare two fields in two different files and then print portions of each file on the same line when matched. It works reasonably well, but every now and again, I notice some errors and cannot seem to figure out what the issue may be and am turning to you for help.
... (2 Replies)
Discussion started by: jvoot
2 Replies
2. UNIX for Beginners Questions & Answers
I have two files and desire to use the strings from $1 of file 1 (file1.txt) as search criteria to find matches in $2 of file 2 (file2.txt). If matches are found I want to output the entire line of file 2 (file2.txt) followed by fields $2-$11 of file 1 (file1.txt). I can find the matches, I cannot... (7 Replies)
Discussion started by: jvoot
7 Replies
3. Shell Programming and Scripting
echo {mbr_key,grp_key,dep_key,abc,xyz,aaa,ccc} |
awk 'gsub(/^|abc,|$/,"") {print}'
Required output
{grp_key,xyz,aaa,ccc} (5 Replies)
Discussion started by: 100bees
5 Replies
4. Shell Programming and Scripting
hi gurus,
I would like to be able to use awk to process 1 file as such:
abc 1 2 3 4 5 6 7 8 9 10
flags 1 2 4
flags 1 2 5
abc 2 3 4 5 6 7 8 9 10 11
flags 1 2 3
abc 4 5 6 7 8 9 6 7 78 89
flags 1 2 3
flags 1 2 4
flags 1 2 3 4
I would like to be able to print field 1 and 5 when the... (4 Replies)
Discussion started by: revaroo
4 Replies
5. Shell Programming and Scripting
Hi,
I need some help on how to print the whole data for unmatched pattern. i have 2 different files that need to be checked and print out the unmatched patterns into a new file. My sample data as follows:-
File1.txt
Id Num Activity Class Type
309 1.1 ... (5 Replies)
Discussion started by: redse171
5 Replies
6. Shell Programming and Scripting
Hi,
I have a file whose lines are something like
Tchampionspsq^@~^@^^^A^@^@^@^A^A^Aÿð^@^@^@^@^@^@^@^@^@^@^A^@^@^@^@^?ð^@^@^@^@^@^@^@?ð^@^@^@^@^@^@pppsq^@~^@#@^@^@^@^@^@^Hw^H^@^@^@^K^@^@^@^@xp^At^@^FTtime2psq^@ ~^@^^^A^@^@^@^B^A
I need to extract all words matching T*psq from the file.
Thing is... (4 Replies)
Discussion started by: shekhar2010us
4 Replies
7. Shell Programming and Scripting
Hello,
I have a file as such:
FFFFFFF6C000000 225280 225240 - - rwxs-
FFFFFFFF79C00000 3240 3240 - - rwxs-
FFFFFFFF7A000000 4096 4096 - - rwxs-
FFFFFFFF7A400000 64 64 ... (3 Replies)
Discussion started by: PointyWombat
3 Replies
8. Shell Programming and Scripting
input
COL1 a1 b1 c1 d1 e1 f1
C1 10 10 10 100 100 1000
C2 20 20 200 200 200 2000
output
C1 a1 10 1
C1 b1 10 1
C1 c1 10 1
C1 d1 100 2
C1 e1 100 2
C1 f1 1000 3
C2 ... (12 Replies)
Discussion started by: ruby_sgp
12 Replies
9. Shell Programming and Scripting
frnd,
Is there any way to print only the string that matched the pattern instead printing the whole line?
thanks in advance. (3 Replies)
Discussion started by: clx
3 Replies
10. Shell Programming and Scripting
Ok, I'm stumped and can't seem to find relevant info.
(I'm not even sure, I might have asked something similar before.):
I'm trying to use shell scripting/UNIX commands to extract URLs from a fairly large web page, with a view to ultimately wrapping this in PHP with exec() and including the... (2 Replies)
Discussion started by: ropers
2 Replies