The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
A basic question of FOR loop
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Rules & FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
A basic question of FOR loop
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
09-28-2007
er_ashu
Registered User
Join Date: Apr 2007
Posts: 44
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
Remove advertisements
Forum Sponsor
er_ashu
View Public Profile
Find all posts by er_ashu