Find knowledge base article(s) by searching for keywords in the title e.g. type linux in the search box below
Find knowledge base article(s) by browsing the subject categories of articles
Technology quick references, cheatsheets, user manuals etc.
Shop Online through ShopifyLite
Tutorials on various IT applications.
Search Title    (UL:0 |SS:f)

Software >> OS >> Unix >> Solaris >> How to use file comparison in an if-then-else-fi block

if cmp file1 file2; then

    echo "files are the same"

else

    echo "files are different

fi

Note:

cmp file1 file2 will return TRUE if they are idential and FALSE otherwise

 

[ © 2008-2021 myfaqbase.com - A property of WPDC Consulting ]