WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [how] listing all applications installed on the system; (with version number)!?  (Read 4972 times)

Offline xor

  • Hero Member
  • *****
  • Posts: 1268
[how to do it!? ] listing all applications installed on the system; (with version number)!?

what is the command for this job !?

Quote
for MS  : https://www.codetwo.com/admins-blog/how-to-check-installed-software-version/
« Last Edit: October 27, 2020, 05:14:16 AM by xor »

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Hi, xor!

I think You need the script to extract the "Current:" field from .tcz.info files for extensions, installed on Your system.
« Last Edit: October 27, 2020, 06:59:38 AM by jazzbiker »

Offline polikuo

  • Hero Member
  • *****
  • Posts: 723
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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
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.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Thanks, guys! You are precise.
@xor, community is interested in such script, please share it after You finish crafting.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 393
Hi !

This doesn't require much coding :
Code: [Select]
#!/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