#! /bin/bash if [[ "$1" == "version" ]] then apt show kernel-pika 2>&1 | grep -v "does not have a stable" | grep Depends: | head -n1 | cut -f2 -d":" | cut -f1 -d"," | cut -f3 -d"-" | tr -d ' ' elif [[ "$1" == "list" ]] then apt list 2>&1 | cut -f1 -d'/' | grep -v dbg | grep -E "linux-image-.*-pikaos" | cut -f3- -d"-" | tr -d ' ' else apt show kernel-pika 2>&1 | grep Depends: | tr "," "\n" | cut -f2 -d":" | grep linux-image | tr -d ' ' fi