Useful CLI tools (bash) for Arch Linux administration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
709 B

#!/bin/bash
###########################################################
# Show specific package, installed and available version
echo ""
PKGMGR="pacman"
for p in $(echo "${@}"); do
INSTALLDATE=$($PKGMGR -Qi $p | grep "Install Date" | awk -F ': ' '{print $2}')
NEWDATE=$($PKGMGR -Si $p | grep "Build Date" | awk -F ': ' '{print $2}')
echo "Installed: $($PKGMGR -Q $p) ($INSTALLDATE)"
echo $($PKGMGR -Si $p | grep -E "Version.*:|Build Date.*:" | awk -F ': ' '{print $2}') | awk -v pkg=$p -F ' ' '{print "Available: " pkg " " $1 " ("substr($0,length($1)+1)")"}' | sed 's/( /(/g'
echo ""
#echo -e "Available: $p $($PKGMGR -Si $p | grep "Version.*:" | awk -F ' ' '{print $3}')\n"
done