Linux bash file to create many job files, then start all job files, log out

Completed Posted 4 years ago Paid on delivery
Completed Paid on delivery

I am using AWS (Linux) and Putty to work with the Linux terminal. In the root directory, there are about 10 "protein" directories like

protein1

protein2

protein3

.

protein10

Each protein directory has only two files in it, one called e.g. "[login to view URL]", and another called "[login to view URL]". The protein2 folder has the 2 files named [login to view URL] and [login to view URL] in it.

There is another directory called Ligands, which contains 1000 drug files called e.g.

[login to view URL]

[login to view URL]

[login to view URL]

So, assume the list of protein folders is e.g. $dir, and the list of drug files (*.pdbqt) inside the Ligands folder is $f.

I need a Linux shell file (ASCII text) containing commands that will loop through the protein folder list, and for each directory, loop through $f, each time creating and saving a small (asciii text) job file containing the two lines:

cd protein1

~/vina --config [login to view URL] --ligand ~/Ligands/[login to view URL] --out [login to view URL]

The above ascii text file should be named e.g. "Job_protein1_drug1"

When done their will be 10,000 ascii text files, with names that range from

Job_protein1_drug1

Job_protein1_drug2

.

Job_protein10_drug1000

(recall, the last file listed above will have contets:

cd protein10

~/vina --config [login to view URL] --ligand ~/Ligands/[login to view URL] --out [login to view URL]

Once I run your shell file that creates the 10000 job files, I will start all of the job files using:

for file in *Job* ; do sh $file ; done

BUT I NEED TO BE ABLE TO LOG OUT OF PUTTY AND HAVE THE JOBS CONTINUE TO RUN.

In order to quit Putty and have all jobs run, should I submit the jobs to a queue? If so what would be the command for submitting the 10000 job files to the queue, perhaps by using the wild card "Job*" to represent all the job files?

Linux Shell Script UNIX

Project ID: #24661172

About the project

3 proposals Remote project Active 4 years ago

Awarded to:

sav0

I will provide you with a shell script to perform exactly what you've described. I will also show you how to execute the generated scripts in the background so you can close the putty session without worry.

$40 USD in 1 day
(0 Reviews)
0.0

3 freelancers are bidding on average $32 for this job

aruaswin

Hi There!! I have been working as Linux Administrator for 6+ years and have written many shell scripts and Ansible Playbook for automating projects. I have been working in vRealize Automation tool which has various Blu More

$25 USD in 1 day
(18 Reviews)
3.8
tropicalzed

I have experience working in Linux supercomputing environments and am able to assist you in navigating this task. I would prefer to do the task in Python because it is much more readable but I am able to do it in bash More

$30 USD in 2 days
(1 Review)
1.1