Shift Command is basically used to move the command line arguments to left. In shell scripting the maximum no. of command line
parameters becomes 9. If we want to get more than 9 parameters we
use the shift command.
[user@ XXXXX]# cat
myscript.sh
#!/bin/bash
echo "Input:
$@"
shift 3
echo "After
shift: $@"
[user@ XXXXX]# sh
myscript.sh one two three four five six
Input: one two three four five six
No comments:
Post a Comment