linux condition control command awk

Objective: output condition according to the conditions specified file

For example: awk output file name of the file length 32

ls | awk -F ':' '{ if(length($0) == 32) {print $0} }'

Rm to delete the file in conjunction with the above clip

ls | awk -F ':' '{ if(length($0) == 32) {print $0} }' |xargs rm -rf

Guess you like

Origin www.cnblogs.com/yankang/p/11765481.html