10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
2. Shell Programming and Scripting
I am looking at the NR==FNR posts and trying to use them to achieve the following but I am not getting it.
I have 2 files. I want to match column 8 in file 1 with column 2 in file 2. When they match I want to replace column 9 in file 1 with column 1 in file 2.
This is and extract from file 1
... (5 Replies)
Discussion started by: kieranfoley
5 Replies
3. Shell Programming and Scripting
Hi,
I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file.
File1 - file2 = file3
wc -l file1.txt
58112
wc -l file2.txt
55260
head -5 file1.txt
101214200123
101214700300
101250030067
101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies
4. Shell Programming and Scripting
Hello,
I have two files as the following:
File1:
F0100020 A G
F0100030 A T
F0100040 A G
File2:
F0100040 A G BTA-28763-no-rs 77.2692
F0100030 A T BTA-29334-no-rs 11.4989
F0100020 A G BTA-29515-no-rs 127.006
I want to sort the second file based on the... (6 Replies)
Discussion started by: Homa
6 Replies
5. Shell Programming and Scripting
Hi,
I have two input files as
File1 :
ABC:client1:project1
XYZ:client2-aa:project2
DEF:client4:proj
File2 :
client1:W-170:xx
client2-aa:WT-04:yy
client4:L-005A:zz
Also, array of valid values can be hardcoded like
Output :
ABC:W:project1
XYZ:WT:project2 (1 Reply)
Discussion started by: aa2601
1 Replies
6. Shell Programming and Scripting
Dear all
I am having two list files , i want join these two file according second column in first file and first column in second file
1st file
1 A
2 R
3 B
4 s
5 S
2 nd file
A m
S n
B i
s L
R f
resultent output should... (2 Replies)
Discussion started by: suryanarayana
2 Replies
7. Shell Programming and Scripting
Hi,
I have a data file xyz.dat similar to the one given below,
2345|98|809||x|969|0
2345|98|809||y|0|537
2345|97|809||x|544|0
2345|97|809||y|0|651
9685|98|809||x|321|0
9685|98|809||y|0|357
9685|98|709||x|687|0
9685|98|709||y|0|234
2315|98|809||x|564|0
2315|98|809||y|0|537... (2 Replies)
Discussion started by: nithins007
2 Replies
8. Shell Programming and Scripting
Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2
file 1 sample
SNDK 80004C101 AT
XLNX 983919101 BB
NETL 64118B100 BS
AMD 007903107 CC
KLAC 482480100 DC
TER 880770102 KATS
ATHR 04743P108 KATS... (7 Replies)
Discussion started by: rydz00
7 Replies
9. Shell Programming and Scripting
Hi, Iam new to unix. I have one input file .
Input file :
ID1~Name1~Place1
ID2~Name2~Place2
ID3~Name3~Place3
I need output such that only first column should change to fixed width column of 15 characters of length.
Output File:
ID1<<12 spaces>>Name1~Place1
ID2<<12... (5 Replies)
Discussion started by: manneni prakash
5 Replies
10. Shell Programming and Scripting
file1.txt :
india pakistan bangladesh
japan canada africa
USA srilanka Nepal
file2.txt
Delhi
Tokyo
washington
I have to cut the first column of file1.txt and apend it with file2.txt as another column like this
Delhi india
Tokyo japan
washington USA
... (4 Replies)
Discussion started by: sakthifire
4 Replies