Knowledge Share
Linux Internals Networking C Programming Technical Posts
Wednesday, 16 November 2011
Search and Replace in awk
ls -R | gawk '{if($1 ~ /.*:$/){split($1,a,"/");if(a[length(a)] ~ /[a-z]/){if(length($1) > 10){print $1;}}}}' | awk '{ sub(/[:]$/, ""); print }' | xargs rm -rf
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)