Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash compare two files

# this will print if they're identical or not
diff file1 file2 -s
Comment

compare two files shell script

if cmp -s "file1" "file2"
then
   echo "The files match"
else
   echo "The files are different"
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: scan all udp ports nmap 
Shell :: copy local repo 
Shell :: docker build from github repository 
Shell :: shell get unique lines 
Shell :: remove empty pdf page 
Shell :: make tarball backup of director 
Shell :: sed up to first match 
Shell :: sed from start to match 
Shell :: stack navigator 
Shell :: android studio tortoisegit 
Shell :: permissions do not allow pasting files in this directory 
Shell :: install nmap 
Shell :: install scala on mac 
Shell :: update composer 
Shell :: ubuntu bluetooth microphone not working 
Shell :: install tensorflow from source ubuntu 18.04 
Shell :: git first time 
Shell :: how to clear background jobs 
Shell :: bash sum float numbers 
Shell :: the ycmd server install 
Shell :: needs merge error: you need to resolve your current index first 
Shell :: mac tftp server directory 
Shell :: increase open file limit linux mac catalina mariadb 
Shell :: osx add user to group 
Shell :: conda install pdftotext 
Shell :: git delete master branch and recreate 
Shell :: ubuntu right click not working 
Shell :: windows open port firewall cmd 
Shell :: grub download 
Shell :: change the keyboard language in i3wm 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =