Thursday, June 3, 2021

XARGS AWK CUT GREP

ls -l . | grep ^d | awk '{print $9}' | xargs rm -rf

ls -al | grep -E '^-.*ml'

ls -l | grep -E '^-.*ml' | awk '{print $9}' |xargs rm -f



https://www.thegeekstuff.com/2011/10/grep-or-and-not-operators/

https://stackoverflow.com/questions/16900945/bash-extract-string-from-text-file-with-space-delimiter/16901235#16901235

https://stackoverflow.com/questions/219402/what-linux-shell-command-returns-a-part-of-a-string

No comments:

Post a Comment

Azure - Pipeline - Add Approver for Stage

https://learn.microsoft.com/en-us/azure/devops/pipelines/process/approvals?view=azure-devops&tabs=check-pass