Skip to content

Commit e89d3b4

Browse files
Create shift_arg.sh
1 parent 2901f93 commit e89d3b4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

bash shell/code/shift_arg.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
#
3+
# Showing the use of shift
4+
5+
echo "The arguments provided are $*"
6+
echo "The value of \$1 is $1"
7+
shift
8+
echo "The new value of \$1 is $1"
9+
10+
exit

0 commit comments

Comments
 (0)