10 More Discussions You Might Find Interesting
1. UNIX and Linux Applications
Hi,
We need to compare a text file File1.txt and config file File2.txt in a way that it checks if the content of File1.txt exists between the range mentioned in File2.cfg.
The range here is the range between col1 and col2 of File2.cfg
If the content of File1.txt lies between the range of... (12 Replies)
Discussion started by: CFA
12 Replies
2. Shell Programming and Scripting
I'm not sure if i can put the problem in understandable form.Let me try:
I have a array which is like and always fixed:
Array1=(new inprogress pending Restored Resolved )
Other 2 array array2 which may varry but always subset of above array:
Like it can be :
Array2=(New inprogress... (2 Replies)
Discussion started by: InduInduIndu
2 Replies
3. Shell Programming and Scripting
Hi All,
I want to write a script which will compare two files and tell me if the files are different.
Actually my files will be same but order of lines will be different,so diff is not working.
I have written a script to do this:-
while read line; do
cnt=`grep -i $line... (6 Replies)
Discussion started by: prasson_ibm
6 Replies
4. Shell Programming and Scripting
Hi All
I have to files
cat a.txt
AAA
BBB
CCC
DDD
and
cat b.txt
AAA
CCC
EEE
i want to compare these two files and o/p should have content of file a.txt which is not in file b.txt
c.txt
BBB
DDD
Please help me (3 Replies)
Discussion started by: aaysa123
3 Replies
5. Shell Programming and Scripting
Hi All
I have to files
cat a.txt
AAA
BBB
CCC
DDD
and
cat b.txt
AAA
CCC
EEE
i want to compare these two files and o/p should have content of file a.txt which is not in file b.txt
c.txt
BBB
DDD
Please help me (1 Reply)
Discussion started by: aaysa123
1 Replies
6. Shell Programming and Scripting
HI,
I would like to know how to compare two files and replace non-matching lines with "_" .
I can get non-mathing lines with
grep -v -f file1 file2
i just want to knw how to display 'file2' with non-matching lines from 'file1' replaced by "_"
for exmaple
file1:
a
b
c
d
... (2 Replies)
Discussion started by: maddy81
2 Replies
7. UNIX for Dummies Questions & Answers
Hello everyone,
I would like to know how to compare two files and modify any differences with some other data using shell script.
I think it would be better understood with an example.
I got two files named 'filex' and filey'. 'filex' is constant file without any changes in data. 'filey' is... (2 Replies)
Discussion started by: maddy81
2 Replies
8. Shell Programming and Scripting
Hi,
I have written a script which would FTP a dump file to the FTP server and log the whole activity into a file. to confirm the success of the file copy i grep for "226 file receive OK" and then send out an email saying success. Now i want to make sure the bytes of the local file and... (4 Replies)
Discussion started by: dba.admin2008
4 Replies
9. Shell Programming and Scripting
a=10
b=10.6
c=$(echo "$a - $b" | bc)
if ]
echo "success"
else
echo "failure"
fi
while executing the above sample code, am getting the below error:
seems unix is comparing .6 with 0 instead of 0.6 with 0.
can anyone help me in solving this ?
regards, (7 Replies)
Discussion started by: cmaroju
7 Replies
10. Shell Programming and Scripting
Hi Guys,
I am new to scripting
I have written a code to compare strings,but I am getting some Exception
Code snippet:
MODE="D"
if ]; then
. $file1
fi
Error:
./BatchJobs.sh: [[: execute permission denied
I have given all Execute permissions to the script(chmod 755... (2 Replies)
Discussion started by: Anji
2 Replies