1#!/bin/bash 2 3[ -f testing.sh ] && . testing.sh 4 5#testing "name" "command" "result" "infile" "stdin" 6 7HOST="$(cat /proc/sys/kernel/hostname)" 8testing "get" "hostname" "$HOST\n" "" "" 9 10if [ "$(id -u)" -ne 0 ] 11then 12 echo "$SHOWSKIP: groupdel (not root)" 13 return 2>/dev/null 14 exit 15fi 16 17testing "set" 'hostname "2>&1 | tee"; hostname; hostname "$HOST"' "2>&1 | tee\n" "" "" 18