LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-25-2014, 01:15 PM   #1
msarguru
LQ Newbie
 
Registered: Sep 2014
Posts: 3

Rep: Reputation: Disabled
Unhappy looping files to run a body multiple times


Hi guys,
It will be great if someone can give some suggestions.....


### How to loop the body (shown below) to different "chr$" files, where dollar sign take different values (eg. 1,3,5,7,12).

#### Say for instance, for the first run it takes the value chr1 (and use it in the body) and then chr3 and so on.....


This is the body of the loop file:


/drn/common/u/snn/FAST/FAST.1.8.mc/bin/linux_x86_64/FAST \
--summary-file /drn/common/data/chr$.simple \
--hap-file /drn/common/CEU/chr$.hap.gz \
--pos-file /drn/common/CEU/chr$.hap.ra.gz \
--out-file /drn/common/output/out_chr$ \
--gene-set /drn/common/data/chr$.txt \
--chr $ \
--mode summary \
--n-sample 2000 \
--logistic-vegas-perm \


Thanks a bunch
 
Old 09-25-2014, 01:17 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,116

Rep: Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530Reputation: 1530
You would be looking for a 'for loop' to do this.

http://tldp.org/LDP/abs/html/loops1.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Allow a shell script to run only once if called multiple times. Springs Linux - General 1 03-27-2013 08:35 AM
Create a Unique folder in the output location when the script is run multiple times.. prravin1 Programming 17 06-13-2012 12:39 PM
how to: looping forms for multiple database entries pizzipie Programming 1 05-17-2012 01:22 PM
crontab - how to run multiple times blizunt7 Linux - General 4 12-09-2008 10:23 AM
initialization files run multiple times Brad Richards Linux - Newbie 2 02-19-2005 11:56 AM


All times are GMT -5. The time now is 12:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration