Do you want BuboFlash to help you learning these things? Or do you want to add or correct something? Click here to log in or create user.



Question
In linux, in bash scripting, the [...] keyword is used to iterate over the command line arguments, so that $1 gets the value of $2 , $2 gets the value of $3 , on each call.
Answer
shift

Question
In linux, in bash scripting, the [...] keyword is used to iterate over the command line arguments, so that $1 gets the value of $2 , $2 gets the value of $3 , on each call.
Answer
?

Question
In linux, in bash scripting, the [...] keyword is used to iterate over the command line arguments, so that $1 gets the value of $2 , $2 gets the value of $3 , on each call.
Answer
shift
If you want to change selection, open document below and click on "Move attachment"

7. Shell Scripting
gh each argument and decide what to do with it. A script like for i in $1 $2 $3 $4 ; do <statments> done doesn't give us much flexibilty. The shift keyword is meant to make things easier. <span>It shifts up all the arguments by one place so that $1 gets the value of $2 , $2 gets the value of $3 , and so on. ( != tests that the "$1" is not equal to "" , that is, whether it is empty and is hence past the last argument.) Try while test "$1" != "" ; do echo $1 shift done and run the program w

Summary

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill

Details

No repetitions


Discussion

Do you want to join discussion? Click here to log in or create user.