Sponsored Content
Top Forums Shell Programming and Scripting Qsub + job array + while read; do; done Post 303014288 by Chubler_XL on Thursday 8th of March 2018 03:05:44 PM
Old 03-08-2018
It's not entirely clear what you are after here. Can you show us a worked example if list file contained 3 lines like this

Code:
harry
bob
mary

For example you may want -t value incremented for each line something like this:

Code:
   echo "harry" | qsub -N loop -t 1
   echo "bob"   | qsub -N loop -t 2 
   echo "mary"  | qsub -N loop -t 3


Last edited by Chubler_XL; 03-08-2018 at 04:11 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read input file for batch job

hi all, I am a newbie in unix shell script. May I know how to write a bacth job to read a list of files afrom the inout file and do the chmod ? Thanks. i.e. inside input.txt ==== a.txt b.txt c.txt and I want to write a batch job to read the input .txt and do the chmod 755 for all 3... (14 Replies)
Discussion started by: kinmak
14 Replies

2. Shell Programming and Scripting

how to read a var value into array

Hi I need to read a value of the variable into array so each character/digit will become an array element,for example: A=147921231432545436547568678679870 The resulting array should hold each digit as an element. Thanks a lot for any help -A (7 Replies)
Discussion started by: aoussenko
7 Replies

3. Shell Programming and Scripting

Read array from a file

Hi I've a config file like: file1 #comment k_array: 1 2 3 4 5 n_array: 7 8 9 0 11 I'd like to write a script that read it and store k_array and n_array in 2 arrays. I mean the script should be able to use both as array. I've tried to use awk as (only for one array): ... (5 Replies)
Discussion started by: Dedalus
5 Replies

4. Shell Programming and Scripting

cron job issue..i hav read the basic threads already...

hi friends well m facing a different sort of issue in my cron. i hav set job like this 30 09 * * 1 /bin/backup14M 01 14 * * 1 /bin/backup14N 20 18 * * 1 /bin/backup14E that is for every Monday at three different times. but, first job executes well, later ones do not. I checked my... (13 Replies)
Discussion started by: oracle.test2
13 Replies

5. Shell Programming and Scripting

qsub

Hey all, I have a binary file, named "exe1" that receives a parameter. (I don't have its source code). Executing "exe1" results in creating 3 output files. I have a bash script that runs "exe1". I want to enter "exe1" to cluster queue (using subq command) But i want to do it more than... (1 Reply)
Discussion started by: elad2109
1 Replies

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

7. UNIX for Dummies Questions & Answers

Qsub and printf

Hello, I have some issue with qsub and the standard output : I launch a script that "echoes" the string "abc" and then executes a C program in which I print informations with the printf function ; the .o file contains "abc" but not the information displayed by printf. I also tried... (0 Replies)
Discussion started by: Shaderw
0 Replies

8. UNIX for Advanced & Expert Users

Collecting job id from qsub command

Hello. Hopefully this is the right forum, did a search and found some similar questions here. I'm trying to find out if there is a way to get the job id while submitting a job using qsub. I want to monitor the list of active jobs using qstat and when my jobid is no longer on the active list, I... (3 Replies)
Discussion started by: aeoleon88
3 Replies

9. Shell Programming and Scripting

PERL : Read an array and write to another array with intial string pattern checks

I have an array and two variables as below, I need to check if $datevar is present in $filename. If so, i need to replace $filename with the values in the array. I need the output inside an ARRAY How can this be done. Any help will be appreciated. Thanks in advance. (2 Replies)
Discussion started by: irudayaraj
2 Replies

10. Programming

C++ how would you read this file into an array.

here is the pesudo file. REREREEEEEERRRREER SOMEStrinG1234 RERRRR EEERRRREER SOMEStrinG1224 REREREEEREERRR REE SOMEStrinG1214 REREREREREREREEEER SOMEStrinG1204 RERE EEEEEERRRRRRR SOMEStrinG1294 REREEREEE ERRRREER SOMEStrinG1284 REREREEEEEERR REER here is my attempted code #include... (3 Replies)
Discussion started by: briandanielz
3 Replies
SGE_INTRO(1)						   Sun Grid Engine User Commands					      SGE_INTRO(1)

NAME
sge_intro.1 - a facility for executing UNIX jobs on remote machines DESCRIPTION
Sun Grid Engine is a facility for executing UNIX batch jobs (shell scripts) on a pool of cooperating workstations. Jobs are queued and exe- cuted remotely on workstations at times when those workstations would otherwise be idle or only lightly loaded. The work load is distrib- uted among the workstations in the cluster corresponding to the load situation of each machine and the resource requirements of the jobs. User level checkpointing programs are supported and a transparent checkpointing mechanism is provided (see sge_ckpt(1)). Checkpointing jobs migrate from workstation to workstation without user intervention on load demand. In addition to batch jobs, interactive jobs and par- allel jobs can also be submitted to Sun Grid Engine. USER INTERFACE
The Sun Grid Engine user interface consists of several programs which are described separately. qacct(1) qacct extracts arbitrary accounting information from the cluster logfile. qalter(1) qalter changes the characteristics of already submitted jobs. qconf(1) qconf provides the user interface for configuring, modifying, deleting and querying queues and the cluster configuration. qdel(1) qdel provides the means for a user/operator/manager to cancel jobs. qhold(1) qhold holds back submitted jobs from execution. qhost(1) qhost displays status information about Sun Grid Engine execution hosts. qlogin(1) qlogin initiates a telnet or similar login session with automatic selection of a low loaded and suitable host. qmake(1) qmake is a replacement for the standard Unix make facility. It extends make by its ability to distribute independent make steps across a cluster of suitable machines. qmod(1) qmod allows the owner(s) of a queue to suspend and enable all queues associated with his machine (all currently active processes in this queue are also signaled) or to suspend and enable jobs executing in the owned queues. qmon(1) qmon provides a Motif command interface to all Sun Grid Engine functions. The status of all or a private selection of the configured queues is displayed on-line by changing colors at corresponding queue icons. qquota(1) qquota provides a status listing of all currently used resource quotas (see sge_resource_quota(1).) qresub(1) qresub creates new jobs by copying currently running or pending jobs. qrls(1) qrls releases holds from jobs previously assigned to them e.g. via qhold(1) (see above). qrdel(1) qrdel provides the means to cancel advance reservations. qrsh(1) qrsh can be used for various purposes such as providing remote execution of interactive applications via Sun Grid Engine comparable to the standard Unix facility rsh, to allow for the submission of batch jobs which, upon execution, support terminal I/O (stan- dard/error output and standard input) and terminal control, to provide a batch job submission client which remains active until the job has finished or to allow for the Sun Grid Engine-controlled remote execution of the tasks of parallel jobs. qrstat(1) qrstat provides a status listing of all advance reservations in the cluster. qrsub(1) qrsub is the user interface for submitting a advance reservation to Sun Grid Engine. qselect(1) qselect prints a list of queue names corresponding to specified selection criteria. The output of qselect is usually fed into other Sun Grid Engine commands to apply actions on a selected set of queues. qsh(1) qsh opens an interactive shell (in an xterm(1)) on a low loaded host. Any kind of interactive jobs can be run in this shell. qstat(1) qstat provides a status listing of all jobs and queues associated with the cluster. qtcsh(1) qtcsh is a fully compatible replacement for the widely known and used Unix C-Shell (csh) derivative tcsh. It provides a command- shell with the extension of transparently distributing execution of designated applications to suitable and lightly loaded hosts via Sun Grid Engine. qsub(1) qsub is the user interface for submitting a job to Sun Grid Engine. SEE ALSO
sge_ckpt(1), qacct(1), qalter(1), qconf(1), qdel(1), qhold(1), qhost(1), qlogin(1), qmake(1), qmod(1), qmon(1), qresub(1), qrls(1), qrsh(1), qselect(1), qsh(1), qstat(1), qsub(1), qtcsh(1), Sun Grid Engine Installation Guide, Sun Grid Engine Administration Guide, Sun Grid Engine User's Guide. COPYRIGHT
Copyright: 2008 by Sun Microsystems, Inc. SGE 6.2u5 $Date$ SGE_INTRO(1)
All times are GMT -4. The time now is 08:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy