Paste #273547

   
pasted on 27.03.2024 17:44
  • Edit to this paste
  • Print
  • Raw
  • Compare with paste
    #  
  • Toggle line numbers
  • Syntax highlighting  
Text paste
1
2
3
4
5
6
7
8
9
cp ./file.txt ./file_copy.txt;
FILE_SUM=`md5sum ./file.txt | head -c 5`;
FILE_COPYSUM=`md5sum ./file_copy.txt | head -c 5`;
 if [[ "$FILE_SUM" == "$FILE_COPYSUM" ]]
  then
echo "Буфер есть. Пишем..." && echo  "New string" > file.txt && cat file_copy.txt >> file.txt && cat file.txt
  else
echo "Буфера нет...";
 fi
Add Comment
Author