Sponsored Content
Top Forums Shell Programming and Scripting Creating script with multiple job arrays Post 303026245 by Scrutinizer on Thursday 22nd of November 2018 09:22:31 AM
Old 11-22-2018
From the man page:
Quote:
sbatch exits immediately after the script is successfully transferred
to the SLURM controller and assigned a SLURM job ID. The batch script
is not necessarily granted resources immediately, it may sit in the
queue of pending jobs for some time before its required resources
become available.
So the two commands will be executed immediately after one another. The wait statement has no function here, since no shell controlled background jobs are specified/used in the shell script.

So you will need to create dependencies between jobs. Did you checkout the -d option?
Quote:
-d, --dependency=<dependency_list>
Defer the start of this job until the specified dependencies
have been satisfied completed. [..]
This User Gave Thanks to Scrutinizer For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

shell: creating different arrays based on function argument

hi, I was wondering if there was a good way to create an array within a function, where the name is based on a passed argument? I tried this: _____________________________ func(){ #take in 1st arg as the arrayname arrayName=$1 let i=0 while read line do arrayName=${line} let i+=1... (5 Replies)
Discussion started by: nix21
5 Replies

2. Shell Programming and Scripting

Creating an unknown number of arrays

I need to create arrays like this: cnt=0 { while read myline; do if ];then firstpass="${myline##<meas>}" meas="${firstpass%%</meas>}" tempmeas="${meas%%;*}" MEAS$cnt=$tempmeas print $cnt print ${MEAS'$cnt'} ... (2 Replies)
Discussion started by: ajgwin
2 Replies

3. Shell Programming and Scripting

Joining two arrays and then creating a variable

Hello all... I'd like to create a variable from an array element from two arrays. In my search for answers I found this code for bash that joins two arrays and then started to work with it. I had got to work once and then foolishly without saving the code, I started to edit it for ksh and... (4 Replies)
Discussion started by: carlos25
4 Replies

4. Shell Programming and Scripting

Multiple instances of the job in shell script.

Hi, Please let us know how to create a multiple instances of a job in the shell script. Thanks. Gangegowda K.G (1 Reply)
Discussion started by: Gangegowda
1 Replies

5. Shell Programming and Scripting

Need help in creating arrays using shell

Hi, I need help in creating a array in shell scirpt. I have a file which has following details. hostname devices device1 device 2 de abcdmhs10 1234 2343 2353 3343 3435 2343 bcdfmhs11 2343 2443 3434 8874 0343 3434 (5 Replies)
Discussion started by: jpkumar10
5 Replies

6. Shell Programming and Scripting

creating multiple sub-/directories using a shell script

0 Hi, I am looking for a way of creating multiple directories using the mkdir -p command in a shell script. I'm working with an Ubuntu machine and try to do something like that: #!/bin/sh ... (3 Replies)
Discussion started by: frymor
3 Replies

7. Shell Programming and Scripting

How to write bash script for creating user on multiple Linux hosts?

I wonder whether someone can help me with what I'm trying to achieve Basically, the objective is one script to create new user on more than 70 linux hosts if required. Everything works apart from the highlighted part. It gave me an output passwd: Unknown user name ''. when try to set... (35 Replies)
Discussion started by: fugeulu
35 Replies

8. Shell Programming and Scripting

How to put the multiple job on-hold using shell script?

Hi.. I need to put multiple jobs on ON HOLD in Autosys.. please help me on this. For Example: 1)ABCD_EFGH_IJKL 2)abcd_efgh_ijkl (2 Replies)
Discussion started by: Maanjesh
2 Replies

9. Shell Programming and Scripting

Shell script for creating multiple users with password

for UserName in `cat users` ; do useradd -d /u02 -s /usr/libexec/openssh/sftp-server -G ftp-users $UserName ; PassWord=$( echo $( tr '' '' <<< ${UserName:0:1} )${UserName:1} ) ; echo "$PassWord@123" | passwd $UserName --stdin ; done can some one explain what the bold text do Please use... (5 Replies)
Discussion started by: James0806
5 Replies

10. Shell Programming and Scripting

Creating a script to download images from multiple cameras using ghoto2

I should start by saying that I am totally new to linux... I am trying to create a script that downloads images from multiple cameras into a specific folder on my machine. Ideally renaming the images as they are downloaded. I have installed gphoto2 which as a command line interface that... (0 Replies)
Discussion started by: benpems
0 Replies
atrm(1) 							   User Commands							   atrm(1)

NAME
atrm - remove jobs spooled by at or batch SYNOPSIS
atrm [-afi] [ [ job #] [user...]] DESCRIPTION
The atrm utility removes delayed-execution jobs that were created with the at(1) command, but have not yet executed. The list of these jobs and associated job numbers can be displayed by using atq(1). atrm removes each job-number you specify, and/or all jobs belonging to the user you specify, provided that you own the indicated jobs. You can only remove jobs belonging to other users if you have solaris.jobs.admin privileges. OPTIONS
The following options are supported: -a All. Removes all unexecuted jobs that were created by the current user. If invoked by the privileged user, the entire queue will be flushed. -f Force. All information regarding the removal of the specified jobs is suppressed. -i Interactive. atrm asks if a job should be removed. If you respond with a y, the job will be removed. FILES
/var/spool/cron/atjobs spool area for at jobs ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
at(1), atq(1), auths(1), cron(1M), auth_attr(4), attributes(5) SunOS 5.10 13 Aug 1999 atrm(1)
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy