Skip to content

Instantly share code, notes, and snippets.

@nitesh8860
Created February 13, 2020 04:08
Show Gist options
  • Save nitesh8860/2c71c826104a1b464249c581f19bb9ec to your computer and use it in GitHub Desktop.
Save nitesh8860/2c71c826104a1b464249c581f19bb9ec to your computer and use it in GitHub Desktop.
#!/bin/bash
echo script name: $0
echo first argument: $1
echo number of arguments passed: $#
echo all the arguments are: $@
echo exit status of most recent process: $?
echo process id of the script: $$
echo username: $USER
echo hostname: $HOSTNAME
echo a random number: $RANDOM
echo current line number: $LINENO
echo sleeping for 5 seconds
sleep 5
echo total seconds to run this script: $SECONDS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment