Created
November 1, 2016 10:45
-
-
Save deanishe/e5ef5e3d98f01865c4a7b0064633fc8e to your computer and use it in GitHub Desktop.
Extract installed package names from apt-get output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
pkgs=() | |
packages() { | |
while read ln; do | |
echo -n "$( echo $ln | cut -d " " -f2 ) " | |
done | |
} | |
apt get install abc xyz | grep "Unpacking" | packages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment