awk -F ':' '{print $3,$4}' 1.txt awk -F ':' 'OFS=":" {print $3,$4}' 1.txtawk '/root|user/' 1.txt 匹配root或者userawk '/(oo)+/' 1.txt 一或多次ooawk -F ':' '$1~/r*o/ {print $3}' 1.txt 第一段
编写个shell脚本将当前目录下大于10K的文件,然后删除#!/bin/bash#author: liqilong#date: 2016-08-26#Decs: find the file (if they more than 10K)and remove them .for Filename in `ls -l|awk '$5 > 10240 {print $9}'`do rm
#!/bin/bash d=`date +%F`if [ "$d" == "2016-08-09" ]then wall '七夕情人节快乐!'fi
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号