10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
i am trying to compare two files in Centos 6.
F1: /tmp/d21
NAME="xvda" TYPE="disk" SIZE="40G" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT=""
NAME="xvda1" TYPE="part" SIZE="500M" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT="/boot"
NAME="xvda2" TYPE="part"... (2 Replies)
Discussion started by: balu1234
2 Replies
2. Shell Programming and Scripting
hi all,
trying this using shell/bash with sed/awk/grep
I have two files, one containing one column, the other containing multiple columns (comma delimited).
file1.txt
abc12345
def12345
ghi54321
...
file2.txt
abc1,text1,texta
abc,text2,textb
def123,text3,textc
gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
3. Shell Programming and Scripting
datafile:
2017-03-24 10:26:22.098566|5|'No Route for Sndr:RETEK RMS 00040 /ZZ Appl:PF Func:PD Txn:832 Group Cntr:None ISA CntlNr:None Ver:003050 '|'2'|'PFI'|'-'|'EAI_ED_DeleteAll'|'EAI_ED'|NULL|NULL|NULL|139050594|ActivityLog|
2017-03-27 02:50:02.028706|5|'No Route for... (7 Replies)
Discussion started by: SkySmart
7 Replies
4. Shell Programming and Scripting
This is probably rehash but I did look. :rolleyes:
I want a bash script that will take Item 1 in File1, traverse all lines in File2 and output if a match exists. Continuing the pattern recursively, Item2, File1, traverse all lines in File2 for a match, continue this pattern until all lines... (6 Replies)
Discussion started by: rcbarr2014
6 Replies
5. UNIX for Dummies Questions & Answers
I would like to add two additional conditions to the actual code I have: print '+' if in File2 field 5 is greater than 35 and also field 7 is grater than 90.
while read -r line
do
grep -q "$line" File2.txt && echo "$line +" || echo "$line -"
done < File1.txt '
Input file 1:
... (5 Replies)
Discussion started by: bernardo.bello
5 Replies
6. Shell Programming and Scripting
Hi all,
I have two files, chap.txt and complex.txt.
chap.txt looks like this:
a
d
l
m
r
k
complex.txt looks like this:
a c d e l m n j
a d l p q r
c p r m
......... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies
7. Shell Programming and Scripting
Hi Gents,
I have 2 files as seen below.
File 1:
9 1020
10 1001
11 1001
12 1002
13 1003
14 1004
15 1004
File 2:
9 1000
11 1001
12 1002
13 1003
15 1004 (5 Replies)
Discussion started by: jiam912
5 Replies
8. Shell Programming and Scripting
I have 2 files:
email_1.out
1 abc@yahoo.com
2 abc_1@yahoo.com
3 abc_2@yahoo.com
data_1.out
<tr> 1 MAIL # 1 TO src_1 </tr>
<tr><td class="hcol">col_id</td> <td class="hcol">test_dt</td> <td class="hcol">user_type</td> <td class="hcol">ct</td></tr>
<tr><td... (1 Reply)
Discussion started by: sol_nov
1 Replies
9. Shell Programming and Scripting
suppose
fileA
vis
vis
gyh
gye
gyh
fileB
vis 23
gyh 21
gye 32
output shud be like
in fileA ...
vis 23
vis 23
gyh 21
gye 32
gyh 21 (1 Reply)
Discussion started by: cdfd123
1 Replies
10. Shell Programming and Scripting
suppose one file
P1168S
P2150L
P85L
Q597R
R1097C
Another file
P2150L
P85L
Q597R
R1097C
R1379C
R1587K
Then output shud be
R1379C
R1587K
thanks (5 Replies)
Discussion started by: cdfd123
5 Replies