![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basic bash 'for loop' usage | Orange Stripes | Shell Programming and Scripting | 2 | 12-18-2007 08:58 PM |
| Basic OS question | catwomen | HP-UX | 4 | 09-08-2006 08:39 PM |
| how to reset failed login in solaris 8.0 | karthikosu | SUN Solaris | 2 | 07-12-2006 03:07 PM |
| basic question | urwannabefriend | UNIX for Dummies Questions & Answers | 1 | 04-10-2004 05:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
A basic question of FOR loop
Hi,
have a basic query. Please see the below code: list="one two three" for var in $list ; do echo $var list="nolist" Done Wht if I want to print only first/ last line in the list Eg one & three Regards er_ashu |
|
||||
|
with bash
Code:
# var=(one two three)
# echo ${var[0]}
one
# echo ${var[2]}
three
|
| Sponsored Links | ||
|
|