UUGRN:Jails/uug shell/pkg info/script

Aus UUGRN
Wechseln zu: Navigation, Suche

Script zur Generierung der Tabelle[Bearbeiten]

#! /bin/sh
#
#

pkg_info | sed -e 's, ,|,; s,|  *,|,' |
{
  echo "{| {{prettytable}}"
  echo " ! Package"
  echo " ! Beschreibung"
  echo " |-"
  while IFS='|' read PKG DESC; do
    echo " | $PKG"
    echo " | $DESC"
    echo " |-"
  done
  echo " |}"
}