Looking for command to compare two strings

Cameron Simpson cs at zip.com.au
Sat Dec 2 21:14:19 UTC 2006


On 02Dec2006 14:31, Paul Smith <phhs80 at gmail.com> wrote:
| >if [ "`md5sum $1`" = "`md5sum $2`" ] ; then echo "same" ; else echo
| >"different" ; fi
| 
| Thanks, Andy. Is not there a native Linux command to compare strings?

But.. "test" and "[" _are_ native Linux commands!
What makes you think they're not?
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

What happens if a big asteroid hits Earth? Judging from realistic simulations
    involving a sledge hammer and a common laboratory frog, we can assume it
    will be pretty bad. - Dave Barry




More information about the fedora-list mailing list