Skip to content

Instantly share code, notes, and snippets.

@albertomm
Last active June 6, 2016 12:05
Show Gist options
  • Save albertomm/b33bd7ca57f05a973065ae2f4a183b6a to your computer and use it in GitHub Desktop.
Save albertomm/b33bd7ca57f05a973065ae2f4a183b6a to your computer and use it in GitHub Desktop.
Bash one-liners

My collection of bash one-liners to be used as reference to write more complex scripts.

find . -type f -name "*.m4a" -print -exec avconv -i {} -acodec libmp3lame -ab 256k {}.mp3 \;
sudo bash -c "grep USB /proc/acpi/wakeup | grep enabled | cut -f 1 | xargs -n 1 > /proc/acpi/wakeup"
sudo grep NOQUEUE /var/log/mail.log | grep -o -e "[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+" | sort | uniq -c | sort -h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment