Tiny Core Base > TCB Tips & Tricks

[how] listing all applications installed on the system; (with version number)!?

<< < (2/2)

Sashank999:
Hi !

This doesn't require much coding :

--- Code: ---#!/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
--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version