Shell script for comparing certain lines in two files
I spent 3 days in searching and trying different scripts and packages but i have no success. All I want to do is compare first and last 2 lines in 2 files.
10x to all. |
Code:
#!/bin/sh |
forrestt already posted, but here's another suggestion:
Code:
#!/bin/sh |
Here is a slightly more robust version. This is not guaranteed by any stretch of the imagination because this isn't tested and I'm not a BASH expert.
Code:
#!/bin/sh |
You can't have spaces in a variable assignment in bash. But I agree, your program is more robust. Change the lines:
Code:
FILE_1 = "$1" Code:
FILE_1="$1" |
Quote:
Thanks again! |
Well, it isn't working anyway (several other minor errors). I'm fixing it and will post results shortly.
|
Code:
#!/bin/sh |
Quote:
Centinul |
I just have the advantage of being able to debug it :)
|
All times are GMT -5. The time now is 12:11 PM. |