Thanks for posting, but im having little trouble at execution
when i tried the same in c shell i'm getting the 4 values as out put,
here i have modified the if condition..
in the output its giving seperate line as
count.sh: line 30: 75.99 =75.99: command not found
count.sh: line 30: 3=3: command not found
status: failed
Last edited by Franklin52; 08-24-2012 at 04:24 AM..
Reason: Please use code tags for data and code samples
There is a text file that contains the data in the following format:
COLUMN1 COLUMN2
ABC 1
ABC 2
ABC 3
DEF 4
DEF 5
XYZ 7
We have to create a second text file... (4 Replies)
Hi,
how to read the 2 files and compare each other in shell script? i have 2 files test1 and test2, both files contains 20 character records.we have to compare file 1 records with file2, if exists then reject the record else we have to append it to test2 file. in file test1 around 100 single... (2 Replies)
hi experts
please help me to compare two files which are in different directory
file1<file will be master file>
(/home/rev/mas.txt}
ex x1
x2
file2 <will be in different folder>
(/home/rev/per/.....)
ex x3
x4
the filesinside per folder i need to compare with master file and the files... (2 Replies)
Hi Experts,
I have 2 files 1 file consists of 800 records and 2 file consists of 100 records with matching column as Membership_Num.So i need a script which will compare the 2 files and displays the output.As these are the files the script should take any delimter like (tab,comma) as input... (6 Replies)
I have these two file that I am trying to compare using shell arrays. I need to find out the changed or the missing
enteries from File2. For example. The line "f nsd1" in file2 is different from file1 and the line "g nsd6" is missing
from file2.
I dont want to use "for loop" because my files... (2 Replies)
Hi All,
I have 2 files like below
vi f1
frog
elephant
rabit
zebra
dog
vi f2
rabit
dog
==============
Now i want to comapre two files and the result will be
frog (8 Replies)
Hi,
I need shell script to compare the two files based on certain fields and output should contains the required fields based on result.pls find sample input files and required output
file 1
COUNT, BNG_IP,PORT,OVLAN
22 , 10.238.60.129,1/1,2009
144 , 10.238.60.129,1/1,2251
... (5 Replies)
I am using c shell and trying to compare 2 files using awk . But the below awk statement doesnt give any result. Pls. advise why am not getting the desired o/p with the corrected awk script.
Need to acheive this solution in awk using C shell.
awk 'FNR==NR{a++;next}
{for(i in a)
{if ( a=$0... (8 Replies)