Tiny Core Linux
Tiny Core Base => TCB Tips & Tricks => Topic started by: xor on October 27, 2020, 02:11:55 AM
-
[how to do it!? ] listing all applications installed on the system; (with version number)!?
what is the command for this job !?
for MS : https://www.codetwo.com/admins-blog/how-to-check-installed-software-version/
-
Hi, xor!
I think You need the script to extract the "Current:" field from .tcz.info files for extensions, installed on Your system.
-
Hi jazzbiker
I think You need the script to extract the "Current:" field from .tcz.info files for extensions, installed on Your system.
[Version] is a better field of choice, many packages may have patches applied, the [Current] field would focus on that.
Either way, you'll have to download the info files.
-
Hi jazzbiker
The Current: field always lists a modification date, but does not always list a version number. As polikuo suggested, Version:
is the field to use.
-
Thanks, guys! You are precise.
@xor, community is interested in such script, please share it after You finish crafting.
-
Hi !
This doesn't require much coding :
#!/bin/ash
for i in "$@"
do
case "${i}" in
-\?|-h|--help) echo -e "This Script is designed to give the version string of the tczs installed on the current system.\nOptionally, you could give '--tcz=' option with the tcz name at the end or give space separated tcz names as arguments."; exit ;;
--tcz=*) GIVENTCZ="${GIVENTCZ} $(basename ${i#--tcz=} .tcz)" ;;
*) GIVENTCZ="${GIVENTCZ} $(basename ${i} .tcz)" ;;
esac
done
if [ "$GIVENTCZ" = "" ]; then
tce-status -i | while IFS= read -r TCZ
do
echo -e "${TCZ}\t$(tce-fetch.sh -O ${TCZ}.info | grep -i '^Version' | tr -d ' ' | tr -d '\t' | cut -d: -f2)"
done
else
for TCZ in $GIVENTCZ
do
echo -e "${TCZ}.tcz \t$(tce-fetch.sh -O ${TCZ}.tcz.info | grep -i '^Version' | tr -d ' ' | tr -d '\t' | cut -d: -f2)"
done
fi