@danielos : Thanks for the reply. . I have tried the above code and will change accroding to my requirement.it would be great if you Could explain the code ?
Hi!
Ok, I have fixed a bit of code:
First I'm looking for two patterns in the file1 "(" and "PRIMARY", then print every line. I check the correct sintax of the $variable and I look for it into file2.
It can be improved, so if you do it tell me please
This is the output:
FAIL: var: XYZ,| FILE1: DECIMAL(10,0) | FILE2: DECIMAL(10)
FAIL: var: ABC,| FILE1: VARCHAR(5) | FILE2: VARCHAR(10)
OK : var: PQR,| FILE1: VARCHAR(20) | FILE2: VARCHAR(20)
OK : var: IST,| FILE1: CHAR(4) | FILE2: CHAR(4)
FAIL: var: EFF_END_DT,| FILE1: DATE | FILE2: CHAR(8)
FAIL: var: EFF_STRT_DT,| FILE1: DATE | FILE2: CHAR(8)
FAIL: var: CRE_DT,| FILE1: DATE | FILE2: CHAR(8)
OK : var: CRE_BY,| FILE1: VARCHAR(5) | FILE2: VARCHAR(5)
I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ?
Source File
*************
# file: /local/test_1
# owner: own
#... (4 Replies)
# cat list.txt
server1
server2
server3
server4
# data to be compared of.
#dns address
1.1.1.1
2.2.2.2
3.3.3.3
#for i in `cat list.txt`
do
grep dns $ i
done (1 Reply)
Total UNIX Rookie, but I'm learning. I have columns of integer data separated by spaces, and I'm using a Mac terminal.
What I want to do:
1. Compare "line 1 column 2" (x) to "line 2 column 2" (y); is y-x>=100?
2. If yes, display difference and y's line number
3. If no, increment x and y by... (9 Replies)
Hi Guys ,
we have one directory ...in that directory all files will be set on each day..
files must have header ,contents ,footer..
i wants to compare the header,contents,footer ..if its same means display an error message as 'files contents same' (7 Replies)
I've two files with data like below:
file1.txt:
AAA,Apples,123
BBB,Bananas,124
CCC,Carrot,125
file2.txt:
Store1|AAA|123|11
Store2|BBB|124|23
Store3|CCC|125|57
Store4|DDD|126|38
So,the field separator in file1.txt is a comma and in file2.txt,it is |
Now,the output should be... (2 Replies)
Hi,
I have two databases with same tables on different servers.I need to check the data content in each table and if something is missing, should print that.
I have a tool which takes the snapshot the table structure,index so on and compares with the other server tables snapshot.
Now i need... (1 Reply)
Hi Everyone,
I will try to explain my question please forgive my english here.
I am looking for shell script or command that can compare data in the files.
I have 50 files in one directory test1 test2 test3 ....so on.
I want to compare data in each files with each other and output each... (4 Replies)
Hi,
I want to calculate the number of pipe delimiters in a file for all lines seperately.
For eg:i have a file Project.txt
Mohit|chawla|123|678
File1|File2|345|767|678
And my file contains many lines like this
it shd give me the output as
4
5
or give me the output for all the... (0 Replies)
Hello everyone, here's the scenario
I have two files, each one has around 1,300,000 lines and each line has a column (phone numbers). I have to get the phones that are in file1 but not in file2. I can get these phones trough Oracle but my boss does not want that so he gave me the files with the... (4 Replies)
I have a list of files that I want to compare to another list of files, how do I do that?
The first list will be my known list and hard coded, for example:
mylist="janfile.tar jarfile.jar jan.rpt.Z" etc.
The second list will be found by doing an 'ls' piped to a file:
ls > filelist.dat
... (4 Replies)