10 More Discussions You Might Find Interesting
1. AIX
I need to compare two files and find the mismatch columns in it for csv and fixed
width file.
Eg:
file1
c1,c2,c3,c4<----columnname
1,a,4,d
2,b,5,e
3,c,6,f
file2
c1,c2,c3,c4<----columnname
3,x,7,f
2,y,8,e
1,z,9,d
output
c2,c3<---- mismatch columname
a,4 x,7
b,5 or y,8 Ok with... (3 Replies)
Discussion started by: sabzR
3 Replies
2. Shell Programming and Scripting
Hello.
I have a config file (/etc/my_config_file) which may content :
#
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interfaces to serve, comma delimited
network_interface=eth0
# set this to the directory you want scanned.
# * if have multiple... (6 Replies)
Discussion started by: jcdole
6 Replies
3. Shell Programming and Scripting
Hello,
I am trying to write a script that will count the number of characters for each line in a file and all the lines that have less than 80 characters and that are ending with a period, I want it to insert a blank line after them immediately. But, for whatever reason the condition if ]] is... (3 Replies)
Discussion started by: Pouchie1
3 Replies
4. Shell Programming and Scripting
Hi all,
I've googling around forum regarding my prob, the nearest would same as thread tittled Insert blank line if grep not found, but she/he did not mention the solution, so I would like to request your help
I've this task, to search in file2 based on pattern in file1 and output it to... (4 Replies)
Discussion started by: masterpiece
4 Replies
5. Shell Programming and Scripting
hi! i researched about comparing two columns here and got an answer. but after examining my two files, i found out that the first columns of the two files are not unique with each other. all i want to compare is the 2nd and 3rd column.
FILE 1:
ABS 456 315
EBS 923 163
JYQ3 654 237
FILE 2:... (1 Reply)
Discussion started by: engr.jay
1 Replies
6. Shell Programming and Scripting
Hi
I have two files f1 and f2 and comma separated file.
I need to comapre two files by field by field and not by whole line.
If they match then skip the line from both the files. If they don't match
write the mismatch record from f1 to f3.
Assume both the files are sorted on first field.
... (5 Replies)
Discussion started by: dgmm
5 Replies
7. Shell Programming and Scripting
I have a file with data as below :
Heading 1
-------------
Heading 1 data1
Heading 1 data2
Heading 1 data3
Heading 1 data4
Heading 2
-------------
Heading 2 data1
Heading 2 data2
Heading 2 data3
Heading 2 data4
Heading 3
-------------
Heading 3 data1
Heading 3 data2
Heading 3... (2 Replies)
Discussion started by: yoursdivu
2 Replies
8. Shell Programming and Scripting
Using unix shell script, how to compare two files and print lines with mismatch? Below are the requirements:
1. The number of lines on the two files is not the same.
2. The difference/mismatch can be found on the second or third column.
3. The comparison is not between line 1 of file 1 and line... (16 Replies)
Discussion started by: kingpeejay
16 Replies
9. Shell Programming and Scripting
I need your help,
I want to add a text every 2nd line and also a blank line after 3 line
(In the output 2nd line is "changetype: modify" and every 4th line is blank line)
Input file format
dn: abc
orclsourceobjectdn: abcd
dn: bcd
orclsourceobjectdn: bcda
dn: cba
orclsourceobjectdn:... (7 Replies)
Discussion started by: athidhi
7 Replies
10. Shell Programming and Scripting
Hello everyone... please help if you can -- I'm stumped. Making this work will save me hours of manual labor:
I need to search file2 for pattern in file1. If pattern found append file2 line to file3. If pattern not found append a blank line to file3.
file1 contents example:
123
456
789... (6 Replies)
Discussion started by: michieka
6 Replies