for loops arguments

Forum rules
Before you post please read this

for loops arguments

Postby kaykav on Thu Jun 28, 2012 1:11 pm

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...
kaykav
Level 3
Level 3
 
Posts: 149
Joined: Tue Jan 06, 2009 12:09 am
Location: crossville tn

Linux Mint is funded by ads and donations.
 

Re: for loops arguments

Postby DrHu on Thu Jun 28, 2012 2:13 pm

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..
User avatar
DrHu
Level 16
Level 16
 
Posts: 6694
Joined: Wed Jun 17, 2009 8:20 pm

Re: for loops arguments

Postby RETNUH on Thu Jun 28, 2012 5:08 pm

This is a pretty good Bash tutorial.

You might want to get a programmer's dictionary.
We all know that light travels faster than sound. That's why certain people appear bright until you hear them speak. -Albert Einstein

Formerly known as Luckydog.

Looking for me? Check the IRC I've been hanging out there.
User avatar
RETNUH
Level 4
Level 4
 
Posts: 456
Joined: Fri Jul 15, 2011 10:55 pm
Location: Nebraska, USA

Re: for loops arguments

Postby kaykav on Thu Jun 28, 2012 7:25 pm

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
kaykav
Level 3
Level 3
 
Posts: 149
Joined: Tue Jan 06, 2009 12:09 am
Location: crossville tn

Re: for loops arguments

Postby Habitual on Fri Jun 29, 2012 8:11 am

RETNUH wrote:This is a pretty good Bash tutorial....


Mad Props. Great Resource
What's a landing but a take off in reverse?
My DorkBlog
User avatar
Habitual
Level 8
Level 8
 
Posts: 2031
Joined: Sun Nov 21, 2010 8:31 pm
Location: Undecided


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 2 guests