Bash TipsΒΆ
The ultimate guide is here
grep stderror and stdout:
aws ec2 delete-transit 2>&1 >/dev/null | grep something
Highlight matches, but do not filter anything. (The magic is in the pipe character)
docker image ls | egrep --color 'brent|'
Recreate File permissions:
find . -type f -exec stat -c '%a %U:%G %n' {} \; | awk '{printf "chmod %s %s && chown %s %s\n", $1, $3, $2, $3}'
Comments
comments powered by Disqus