Sponsored Content
Full Discussion: Submit a qsub script SGE
Top Forums Shell Programming and Scripting Submit a qsub script SGE Post 303041528 by nans on Wednesday 27th of November 2019 03:59:16 AM
Old 11-27-2019
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


Code:
#!/bin/bash
#$ -V
#$ -cwd
#$ -pe make 10

if [ ! StatedUserName == "$StatedUserName" ] ; then
     echo "Variable is not set"
else
     echo "Variable says: $StatedUserName"
fi

and I run the following command



Code:
qsub -v StatedUserName="NB"  hello.sh

and the log output is


Code:
Variable says: NB

The above is all fine. But When I run the command without the variable


Code:
qsub hello.sh

The log is

Code:
Variable says:

Why doesn't it throw an error or state
Code:
Variable is not set

Thank you
 

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. UNIX for Advanced & Expert Users

How to set the SGE job execution order for nested qsub?

Dear All I am trying to write a script to set the SGE job execution order. I named each job with 'job1', 'job2' and 'job3'. I want my script to do: When 'job1' execution is complete, 'job2' is executed; when both 'job1' and 'job2' are complete, 'job3' is executed. First, I tried this... (0 Replies)
Discussion started by: cliffyiu
0 Replies

4. Shell Programming and Scripting

qsub in a bash script?

I was just wondering if it is permissible to qsub from a bash script as follows: #! /bin/sh echo "altering .txt in dir $DIR with retokenize.py" for f in $DIR/txt/*.txt; do echo $f; /l2/nlp/i2b2/retokenize.py < $f > ${f//.txt/.tok}; done echo "altering .tok in dir $DIR with awk... (0 Replies)
Discussion started by: kcgb20
0 Replies

5. 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

6. 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

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

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: #!/bin/bash # Perform fastqc on files in a specified directory. for ((j=1; j <=17; j++)) do directory=/data4/una/batch"$j"/ ... (0 Replies)
Discussion started by: una1992
0 Replies

9. 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

10. 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
SGE_REQUEST(5)						   Sun Grid Engine File Formats 					    SGE_REQUEST(5)

NAME
sge_request - Sun Grid Engine default request definition file format DESCRIPTION
sge_request reflects the format of the files to define default request profiles. If available, default request files are read and processed during job submission before any submit options embedded in the job script and before any options in the qsub(1) or qsh(1) command-line are considered. Thus, the command-line and embedded script options may overwrite the settings in the default request files (see qsub(1) or qsh(1) for details). There is a cluster global, a user private and a working directory local default request definition file. The working directory local default request file has the highest precedence and is followed by the user private and then the cluster global default request file. Note, that the -clear option to qsub(1) or qsh(1) can be used to discard any previous settings at any time in a default request file, in the embedded script flags or in a qsub(1) or qsh(1) command-line option. The format of the default request definition files is: o The default request files may contain an arbitrary number of lines. Blank lines and lines with a '#' sign in the first column are skipped. o Each line not to be skipped may contain any qsub(1) option as described in the Sun Grid Engine Reference Manual. More than one option per line is allowed. The batch script file and argument options to the batch script are not considered as qsub(1) options and thus are not allowed in a default request file. EXAMPLES
The following is a simple example of a default request definition file: ===================================================== # Default Requests File # request group to be sun4 and a CPU-time of 5hr -l arch=sun4,s_cpu=5:0:0 # don't restart the job in case of system crashes -r n ===================================================== Having defined a default request definition file like this and submitting a job as follows: qsub test.sh would have precisely the same effect as if the job was submitted with: qsub -l arch=sun4,s_cpu=5:0:0 -r n test.sh FILES
<sge_root>/<cell>/common/sge_request global defaults file $HOME/.sge_request user private defaults file $cwd/.sge_request cwd directory defaults file SEE ALSO
sge_intro(1), qsh(1), qsub(1), Sun Grid Engine Installation and Administration Guide COPYRIGHT
See sge_intro(1) for a full statement of rights and permissions. SGE 6.2u5 $Date$ SGE_REQUEST(5)
All times are GMT -4. The time now is 02:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy