Skip to content

Instantly share code, notes, and snippets.

@weshouman
Created August 21, 2020 12:05
Show Gist options
  • Save weshouman/4ba8380102185628625635ba24ef71e4 to your computer and use it in GitHub Desktop.
Save weshouman/4ba8380102185628625635ba24ef71e4 to your computer and use it in GitHub Desktop.
advanced linux hints

Follow this guide

Examples

# Match to a *SEARCH_KEYWORD*
tail -f /var/log/syslog | awk '/SEARCH_KEYWORD/'

# Execute a command
(tail -f /var/log/syslog | awk '/TRIGGERING_LINE/ {system("COMMAND_TO_RUN")}' )&
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment