10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Gurus,
I need to compare two file contents and log the difference. the detail as below:
in current directory there is file
abc20140728_1020.txt
abc20140728_1110.txt
I need to find the files which created within 60 minutes first then compare the contents.
I am able to use find... (12 Replies)
Discussion started by: ken6503
12 Replies
2. Shell Programming and Scripting
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies
3. Shell Programming and Scripting
Hello
Has anyone got an example shell script that I can use to compare the contents of two files.
The files should contain the same contents, eg.
file1.txt
apple
pear
grape
file2.txt
apple
pear
grape (2 Replies)
Discussion started by: deedaz
2 Replies
4. UNIX for Dummies Questions & Answers
Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents.....
I try with "diff"...... but confusion how to use "diff" with if ---else
Thanking you (5 Replies)
Discussion started by: krishnampkkm
5 Replies
5. Shell Programming and Scripting
I use diff -r dir1 dir2 to get comparison of two folders that are on same machine.
Now I need the same thing but one of the folders is on a different machine.
Currently I ftp the folder to a temp folder compare using above command and delete the temp folder.
Is there any other better options?... (5 Replies)
Discussion started by: ke3kelly
5 Replies
6. Shell Programming and Scripting
i have been asked to write a bash shell script comparing two directories and sed or awk should not be used in this assignment. compdir will compare filenames in two directories, and list information about filenames that are in one directory but not the other. The information listed will be a long... (1 Reply)
Discussion started by: soccerball
1 Replies
7. Shell Programming and Scripting
Hi,
I have two files, in which the second file has exactly the same contents of the first file with some additional records. Now, if I want to remove those matching lines from file2 and print only the extra contents which the first file does not have, I could use the below unsophisticated... (3 Replies)
Discussion started by: royalibrahim
3 Replies
8. Shell Programming and Scripting
I have been trying to find the answer to this but can't seem to get it.
I have two rows, both are CSV files.
I want to iteratively compare each field value to the corresponding value in the second file.
Example:
File 1.txt
1|hello|3.2|AMB||||B
File 2.txt
1|hi|3,2|ABC||||C
The... (1 Reply)
Discussion started by: axwack
1 Replies
9. Shell Programming and Scripting
I have 2 files
file1
1 TMQUEUE QUE1 STMW633A
100 DMADM DOMGRPSTMW633A STMW633A
100 GWADM GWTGRPSTMW633A STMW633A
100 GWADM GWTGRPSTMW633AA STMW633A
100 GWADM GWTGRPSTMW638A STMW638A
100 TMSYSEVT EVTGRPSTMW633A STMW633A
100 TMSYSEVT ... (2 Replies)
Discussion started by: kaustubh137
2 Replies
10. UNIX for Dummies Questions & Answers
I have an array "arrA" with the following contents:
A0012 Paint Shop.doc
ES001 Contract Signature.doc
Budget Plan.pdf
TS PWS.pdf
My data file "Files.dat" has the same contents:
A0012 Paint Shop.doc
ES001 Contract Signature.doc
Budget Plan.pdf
TS PWS.pdf
I have a script that compares... (0 Replies)
Discussion started by: orahi001
0 Replies