shell 查找文本字符

grep -wq "hello world" a.txt && echo "contain"||echo "not contain"


grep -wq "2020-07-21" scheduler.txt  && echo "yes"||echo "no"

v_time=`date "+%Y-%m-%d %H:%M:%S"`

echo  `date "+%Y-%m-%d %H:%M:%S"`

 

你可能感兴趣的:(Linux)