INNER CODE UNIT · Shell

hide_output

servisys/ispconfig_setup · functions/check_linux.sh:7

function hide_output {
	OUTPUT=$(mktemp)

	# <&-
	"$@" &> "$OUTPUT"

	E=$?
	if [[ $E -ne 0 ]]; then
		echo -e "\nError: The following command failed: $*\n"
		echo "-----------------------------------------"
		cat "$OUTPUT"
		echo "-----------------------------------------"
		echo
		rm -f "$OUTPUT"
		exit $E
	fi

	rm -f "$OUTPUT"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…