|
Maybe you want only to get the "$?" result for that matter:
#!/bin/bash
echo "Enter the output file name"
read output_file
echo "Enter the Orginal file Name"
read write_file
diff $write_file $output_file > /dev/null
if [ $? = 0 ];then
echo "files are identical"
else
echo "they are not identical"
fi
|