You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
415 B
Bash

#!/bin/bash
#
# The shell command `shift` can be used to remove the first argument $1
# and advance the rest of the arguments forward. $2 becomes $1, $3 becomes $2.
#
# Shiftex prints all three arguments by printing the first, shifting the remaining
# arguments, and repeating.
#
#
#
# Print the number of arguments
echo You submitted $# arguments
echo Argument: $1
shift
echo Argument: $1
shift
echo Argument: $1