# # pull this file from http://noc1.org/pub/ # # with the following bash script: # # # # disable posix behavior for subshell redirect # # set +o posix # # bash <(curl -s http://noc1.org/pub/test-script) # # printf "%s" "NOC1 > Press enter to exit the NOC1 shell..."; read # # # # # this is the file to pull... # # printf "%s\n" "This host is named: $(hostname)" # printf "%s\n" "This script is named: ${0}" # printf "%s\n" "which is a file descriptor, not a file name 'cuz we've been redirected from a subshell." # printf "%s\n" "This script is running as user: $USER" # sudo=$(type -p sudo) # [[ -n $sudo ]] && { # printf "%s\n" "The 'sudo' utility is installed at: $sudo" # read -p "Press enter to exit..." # exit 0 # } # printf "%s\n" " The 'sudo' utility is not installed." # read -p "Press enter to exit... " # exit 0 #