lukmac lukmac - 1 year ago 63
Bash Question

shell scripting: get a specified range of parameters

I normally come here if google doesnt work. So this time it goes like this:
In a function, i want to assign to a variable from the 4-th input parameter onward.

function foo {
use var
commands using $1, etc

So i think i cannot use shift, since i want to use $1 afterwards. I do not either want to use an extra var to store $1,$2,$3 and shift. So how should it work?

Answer Source
function foo {
    # ...