Shell 常用技巧
- Shell 常用技巧
echo $RANDOM | cksum | cut -c 1-8 openssl rand -base64 4 | cksum | cut -c 1-8 date +%N | cut -c 1-8
echo "fdsahjgkdhsajglhdjsaga" &>/dev/null
#grep -v 不显示该条件,-c统计查找条数。
grep -vc grep
awk '{print"输出:'"$var"'",$1}'
# -e 为拓展 echo -e "\n"