Skip to content

Instantly share code, notes, and snippets.

@savolla
Created January 14, 2019 23:59
Show Gist options
  • Save savolla/671b77ba7c815b20020ccb4fafbcd778 to your computer and use it in GitHub Desktop.
Save savolla/671b77ba7c815b20020ccb4fafbcd778 to your computer and use it in GitHub Desktop.
installed programs tracker
#!/bin/bash
# pacman -S program --> this is gonna push 'program' into installed-programs.txt
if [ $1=="-S" ]; then
echo $2 >> installed-programs.txt
fi
# pacman -R program --> this is gonna remove the 'program' from installed-programs.txt
if [ $1=="-R" ]; then
echo $(cat installed-programs.txt | grep -v "^$2$") > installed-programs.txt
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment