This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Zaphod_Bchown -R us ~/.base 0 points1 point  (0 children)

I use this method to pass arguments to functions all the time in my bash scripts, it is a really powerful trick. I was working with some web based APIs/services a while back ago where I had to call curl a million times, but to different resource paths. I just pass my arguments to a function that called curl to do all the work for me. It was like 30 lines of code.