Computing.Net > Forums > Unix > for loop

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

for loop

Reply to Message Icon

Name: bijus
Date: May 5, 2003 at 01:27:35 Pacific
OS: hp-ux
CPU/Ram: 937MHZ/64MB
Comment:

i have a file in which there are fields such as SOID and TASKID . for eg:
SO12342323232323 3EA238273927382332323
SO29832983789237 3EA948758479574894545
where the first field is the SOID and the second is the taskid , nowi want to input the first value of SOID and TASKID into a common script foreg: kickstart -w SOID -t TASKID -c CLOSE , then execute the command , then take the second values of SOID and TASKID and execute the same command.how can i go about it.



Sponsored Link
Ads by Google

Response Number 1
Name: Frank
Date: May 7, 2003 at 00:53:45 Pacific
Reply:

Hi,

try:

{ while read SOID TASKID
do
kickstart -w ${SOID} -t ${TASKID} -c CLOSE
done } infile

Have fun
Frank


0
Reply to Message Icon

Related Posts

See More


disk space allowance two variable input from t...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: for loop

For Loop Iteration www.computing.net/answers/unix/for-loop-iteration/7267.html

problem with grep in a for loop www.computing.net/answers/unix/problem-with-grep-in-a-for-loop/3967.html

Unix for loop www.computing.net/answers/unix/unix-for-loop/3717.html