![]() |
|
Programming C, bash, Python, Perl, PHP, Java, you name it. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
I wrote a script to compare 2 same file but in different dir and filename. The md5 sum of both file is the same but how do i assign the output of md5 sum to a variable like $a and $b? Here's my code
Code:
a=$(md5 /home/abc/sss.sh) b=$(md5 /home/abc/43/sss.sh) if [ "$a" = "$b" ] then echo " match" else echo " no match" fi ![]() |
|
|||
![]()
I got it. I look at the md5 man page and use -q quiet option to print only the checksum.
|
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
shell script with zenity | bsdnewbie999 | OpenBSD General | 5 | 24th April 2009 02:37 AM |
shell script-start another process | bsdnewbie999 | Programming | 2 | 23rd April 2009 07:48 PM |
incrementing within a shell script? | spiderpig | Programming | 5 | 29th September 2008 08:12 PM |
Shell Script. | bsdnewbie999 | Programming | 21 | 15th July 2008 07:54 AM |
shell script with input | c0mrade | Programming | 5 | 13th July 2008 04:33 AM |