for loops arguments

About writing shell scripts and making the most of your shell
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
kaykav

for loops arguments

Post by kaykav »

Hi
I've been trying to understand using bash scripts for the past year. Doing 'for loops' now. What does this syntax mean? 'for arg in list'
What is arg? Most importantly , where did 'you' learn all these arguments or parameters. I go thru a tutorial and all of a sudden they use a term unknown to me.
So I have to go to a Forum to ask. There must be a documentation on all the terms being used in writing bash scripts. No? Any way for now, what is 'arg'?
Thank you...
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
DrHu

Re: for loops arguments

Post by DrHu »

http://www.linuxtopia.org/online_books/ ... oops1.html
http://hiox.org/33112-shell-script.php
  • During each pass through the loop, arg takes on the value of each successive variable in the list.
    --what that command line is doing

bash scripting..
http://linuxconfig.org/Bash_scripting_Tutorial

http://linuxreviews.org/beginner/Bash-S ... index.html
--working carefully through any tutorials/guides such as the link above will help, or even a bash howto in 24hrs type book or visual guide book as another choice..
RETNUH

Re: for loops arguments

Post by RETNUH »

This is a pretty good Bash tutorial.

You might want to get a programmer's dictionary.
kaykav

Re: for loops arguments

Post by kaykav »

HEY
Thank you for your rapid response. I thought the 'arg' being used had a special meaning, other than being used as a variable. I've seen it in other notations. Again..Thanks
Habitual

Re: for loops arguments

Post by Habitual »

RETNUH wrote:This is a pretty good Bash tutorial....
Mad Props. Great Resource
Locked

Return to “Scripts & Bash”