如何写项目补丁

Patch a file

https://www.thegeekstuff.com/2014/12/patch-command-examples/

Patch a directory

https://stackoverflow.com/questions/9980186/how-to-create-a-patch-for-a-whole-directory-to-update-it

 

Script : Display a file 

#!/bin/bash
FILE="/tmp/input.txt"
echo "*** File - $FILE contents ***"
cat $FILE

Store the output as a file (这一段代码还没测试过)

#!/bin/bash
FILE="/etc/resolv.conf"
OUT=$(awk '{ print $2 }' $FILE)
echo "*** Nameserver IP ***"
for ip in $OUT
do  
   echo $ip
done

你可能感兴趣的:(如何写项目补丁)