Sponsored Content
Full Discussion: SGE submit script
Top Forums Shell Programming and Scripting SGE submit script Post 303006053 by una1992 on Thursday 26th of October 2017 09:59:30 AM
Old 10-26-2017
SGE submit script

Hi,

I'm trying to edit my working bash script to an SGE script in order to submit it as a job to the cluster.

Currently I have:
Code:
 
#!/bin/bash

# Perform fastqc on files in a specified directory.

for ((j=1; j <=17; j++))
do
   directory=/data4/una/batch"$j"/
   files=$""$directory"/*.fastq.gz"
   batch=$"batch_"$j""
   outfile=$""$batch"_submit_script.sh"

     echo "#!/bin/bash">>$outfile;
     echo "# Your job name">>$outfile;
     echo "# -N $batch">>$outfile;
     echo "# The job should be placed into the queue 'all.q'">>$outfile;
     echo "#$ -q all.q">>$outfile;
     echo "# Running in the current working directory">>$outfile;
     echo "#$ -cwd">>$outfile;
     echo "">>$outfile;
     echo "# Export some necessary environment variables">>$outfile;
     echo "#$ -S /bin/bash">>$outfile;
     echo "#$ -v PATH">>$outfile;
     echo "#$ -v LD_LIBRARY_PATH">>$outfile;
     echo "#$ -v PYTHONPATH">>$outfile;
     echo "# Finally, put your command here">>$outfile;
     echo "">>$outfile;
     echo "#$ for i in $files;">>$outfile;
     echo "#$ do;">>$outfile;
     echo "#$ fastqc -f fastq -o /data4/una/test/fastq/$i;">>$outfile;
     echo "#$done">>$outfile;
     echo "">>$outfile;

     qsub $outfile;
done

But I'm getting an error:
Code:
Unable to read script file because of error: ERROR! invalid option argument "-f"

But
Code:
 fastqc -f fastq -o /data4/una/test/fastq/$i

is a totally valid line in my bash script. Smilie

Thoughts?

Thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

submit a ksh script in background

I submitted a ksh script in the background last night before leaving work: ./ping_test & When I came into work this morning I discovered that it had stopped running when my session timed out. So, I then tried it again this morning and logged out before letting it time out as one unix site... (4 Replies)
Discussion started by: captainzeb
4 Replies

2. Shell Programming and Scripting

Script to submit a job with date parm in maestro

I'm a newbie in scripting attempting to create a script where i can submit a job (in maestro/tivoli) with parameters,in maestro CLI i can do that no problem,i'm thinking about creating a script that will accept input while the script is executing, more like below structure: exec the script -... (1 Reply)
Discussion started by: Kirojin
1 Replies

3. Shell Programming and Scripting

include virtual perl-script - submit button opens a new page..

hello 2 all I can't understand how to insert a perl-script into .shml in a right way. <form> should be working but it's not doing that: <!--#include virtual="/cgi-bin/script.cgi?filename"--> filename is a name of the file which script is using the script is used for a score show (the number... (0 Replies)
Discussion started by: tip78
0 Replies

4. Web Development

include virtual perl-script - submit button opens a new page..

hello 2 all I can't understand how to insert a perl-script into .shml in a right way. <form> should be working but it's not doing that: <!--#include virtual="/cgi-bin/script.cgi?filename"--> filename is a name of the file which script is using the script is used for a score show (the number... (3 Replies)
Discussion started by: tip78
3 Replies

5. Shell Programming and Scripting

Request for help with SGE submission script manipulation

Hi, I have the following SGE submission (HPC calculation) script, which is just a Bash script: #!/bin/bash -l #$ -S /bin/bash #$ -l h_rt=1:00:0 #$ -l mem=4G #$ -N XXX #$ -pe qlc 24 #$ -P XXX #$ -wd /home/uccaxxx/Scratch/222PdT/3vac/c0001/ mpirun -m $TMPDIR/machines -np $NSLOTS... (2 Replies)
Discussion started by: crunchgargoyle
2 Replies

6. UNIX and Linux Applications

Looking to reduce the number a cpus available for SGE

Hey all Im looking to reduce the number of cpus available on a certain node in our cluster available for jobs using SGE. i.e. we have one node that has 24 cpus available for jobs on SGE, i would like to reduce that to 16. Thanks (1 Reply)
Discussion started by: olifu02
1 Replies

7. Programming

Html form to submit data to bash script

hi all, im going to design a web html form so users can input what username and password they want to make the ftp account, once they enter in a username and password they click on the submit button and it submits it to a bash script and then the bash script will run and finish of making the... (3 Replies)
Discussion started by: robertkwild
3 Replies

8. Shell Programming and Scripting

Exec submit form in bash script

Hi All, I'm new in forum. Many congratulations to everyone for all work. I'm not an expert in bash script I've a problem with a sh file. The sh file run every t minuts and it read data from txt file and then compile form. Finally, the user, from the web browser click on send. The script... (0 Replies)
Discussion started by: Herbert
0 Replies

9. Shell Programming and Scripting

Trying to submit web form content to a shell script

Hi I was hoping some one could help me with a problem I have. I am trying to collect some information from a web form and save it to a text file. I found an example on this site that is sort of what I am trying to accomplish, the shell script bellow should echo the input back to the browser... (0 Replies)
Discussion started by: Paul Walker
0 Replies

10. Shell Programming and Scripting

Submit a qsub script SGE

Hello, I'm working on a SGE cluster and trying to echo the variables passed to the qsub command. My script is as follows #!/bin/bash #$ -V #$ -cwd #$ -pe make 10 if ; then echo "Variable is not set" else echo "Variable says: $StatedUserName" fi and I run the... (1 Reply)
Discussion started by: nans
1 Replies
bup-bloom(1)						      General Commands Manual						      bup-bloom(1)

NAME
bup-bloom - generates, regenerates, updates bloom filters SYNOPSIS
bup bloom [-d dir] [-o outfile] [-k hashes] [-c idxfile] [-f] [--ruin] DESCRIPTION
bup bloom builds a bloom filter file for a bup repository. If one already exists, it checks the filter and updates or regenerates it as needed. OPTIONS
--ruin destroy bloom filters by setting the whole bitmask to zeros. you really want to know what you are doing if run this and you want to delete the resulting bloom when you are done with it. -f, --force don't update the existing bloom file; generate a new one from scratch. -d, --dir=directory the directory, containing .idx files, to process. Defaults to $BUP_DIR/objects/pack -o, --outfile=outfile the file to write the bloom filter to. defaults to $dir/bup.bloom -k, --hashes=hashes number of hash functions to use only 4 and 5 are valid. defaults to 5 for repositories < 2 TiB, or 4 otherwise. See comments in git.py for more on this value. -c, --check=idxfile checks the bloom file (counterintuitively outfile) against the specified the .idx. Does not write anything and ignores the -k option. BUP
Part of the bup(1) suite. AUTHORS
Brandon Low <lostlogic@lostlogicx.com>. Bup unknown- bup-bloom(1)
All times are GMT -4. The time now is 03:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy