Skip to content

Instantly share code, notes, and snippets.

@abdulbadii
Created February 1, 2019 12:15
Show Gist options
  • Save abdulbadii/affcbb339e7980ee46b0aa9172496718 to your computer and use it in GitHub Desktop.
Save abdulbadii/affcbb339e7980ee46b0aa9172496718 to your computer and use it in GitHub Desktop.
Arch Linux pacman process in batch every item based on user-specified (basic) regex and his optional exclusion
pm(){
pacman -S `pacman -Ss "$1" |sed -E 'N;s/\n//; /$2/Id; s/^\w+\/(\S+).+/\1/'` <<<y
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment