#! /bin/sh # This code is in the public domain # Written by Robbert Haarman usage="USAGE: list-dependencies " if [ $# -lt 1 ] then echo "$usage" >&2 exit 128 fi case "$1" in -h|--help|-help) echo "$usage" exit ;; -*) echo "Invalid option: $1" >&2 echo "$usage" >&2 exit 128 esac apt-get -s install "$@" | awk '$1 == "Inst" { print $2 }'