What is the use of "shift" command in passing parameters?
Answer / satchi
"shift" is useful when you need to access positional
parameters more than 9.
EX- execute a script to display 11th position parameter.
#./test.sh 1st 2nd 3rd 4th 5th 6th 7th 8th 9th 10th 11th
12th
shell scripts limits the access of arguments up to 9.to
over come this calculate the position of argument you want
to access and use shift to pull inside 9th countdown.
ex:
withen the script write "shift 2" before "echo $9"to
display 11th parameter.
withen the script write "shift 3" before "echo $9"to
display 12th parameter.
| Is This Answer Correct ? | 8 Yes | 1 No |
is there any command to find user password?
I have to write Shells (Linux + Unix)for publishing packages and reports. Is it possible ? What are the differents executable programs ineed to call ?
Explain how you Automate your application using Shell scripting.
c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l
How can we find the process name from its process id?
What is option in shell script?
determine the output of the following command: echo ${new:-variable}
how to print the 2-d, 3-d arrays in unix shell script programs please answer thi questio to my mail venusaikumar@gmail.com
What is the best scripting language?
What does path stand for?
How do we delete all blank lines in a file?
What is the difference between a variable and value?