Sponsored Content
Top Forums Shell Programming and Scripting Writing single script with mutiple sbatch parts Post 303026408 by idbemad on Tuesday 27th of November 2018 09:20:53 AM
Old 11-27-2018
Clarification

Some people might have missunderstood the previous part.

I'm trying to find out if there is a way to write several sbatch scripts into one file so that this one file includes the code for all the seperate scripts.

My idea was something like this:

Code:
#!/bin/bash


variable=whatever



#SBATCH ....
Code for first sbatch 

...
end of code for first sbatch

    #SBATCH ...
    Code for second sbatch
    ...

    end of code for second sbatch
    

           #SBATCH
           Code for third sbatch
           ...
           end of code for third sbatch


and all of this should be in one big executable file including all the code and the different parameters and dependencies for the seperate sbatches.

This way I could define all the variables once and use them in every script and can make sure that the right paths for the variables are set because they are created in the scripts and saved as a variable.

I hope this makes things clearer.
 

10 More Discussions You Might Find Interesting

1. IP Networking

Script to assign mutiple IP's to 1 nic

I need a script to assign multiple IP addresses to a single nic. The machine is running CentOS. Any help would be appreciated. (2 Replies)
Discussion started by: ron310
2 Replies

2. Shell Programming and Scripting

Display mutiple line in single line

Hi All, I had a file called Input.txt, i need to group up in a single line as 1=ttt and the no of lines may vary bewteen the 1=ttt cat Input.txt 1=ttt,2=xxxxxx, 3=4545 44545, 4=66667 7777, 5=77723 1=ttt, 2=xxxxxx, 3=34436 66 3545, 4=66666, 5=ffffff, 6=uuuuuuu 1=ttt, 2=xxxxxx,... (4 Replies)
Discussion started by: manosubsulo
4 Replies

3. Shell Programming and Scripting

writing the content of two files to a single file horizontally

Hi all, assume that i am having two files file.1 and file.2 these are the contents of file.1 these are the contents of file.2 i want these two contents to be written in another single file like this. can you please post your suggestions. Thanks in advance, ... (3 Replies)
Discussion started by: anishkumarv
3 Replies

4. Shell Programming and Scripting

Format Parts of Multiline Section to Single Line

Hello, I have an input file that I need formatted. I was hoping I could use bash to get this done. Title: Kitchen Blender Washer Dishes Title: Bathroom Toilet Sink Title: Bedroom Bed Desired output would be similar to Results("Blender","Washer","Dishes") (1 Reply)
Discussion started by: jl487
1 Replies

5. Shell Programming and Scripting

Need a script to add mutiple printers in solaris box

Hi , i need to configure around 80 printers in a server. can someone please help me with the script. i have a file that has printer name and its ip. like. printer1 1.1.1.1 printer2 0.0.0.0 and so on.. can some one please help me to do it via script. i am using solaris 10 ... (0 Replies)
Discussion started by: chidori
0 Replies

6. UNIX for Dummies Questions & Answers

awk script combining mutiple commands

Hi, I am pretty new to the unix community and have encountered a problem that I am trying to solve. I have 2 files one of which is called passwd file that looks like the following Sample Output daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh ... (1 Reply)
Discussion started by: raven905
1 Replies

7. Shell Programming and Scripting

Incrementing parts of ten digits number by parts

I have number in file which contains date and serial number: 2013101000. The last two digits are serial number (00). So maximum of serial number is 100. After reaching 100 it becomes 00 with incrementing 10 which is day with max 31. after reaching 31 it becomes 00 and increments 10... (31 Replies)
Discussion started by: Natalie
31 Replies

8. Shell Programming and Scripting

Convert mutiple spaces file to single tab

I have the following file I wanted to convert mutiple spaces to tab: I tried cat filename | tr ' ' '\t' or sed 's/ */ /' FILE but it looses the format 5557263102 5557263102 5552074858 5726310211 5557263102 5557263102 5557263103 5557263103 2142406768 ... (2 Replies)
Discussion started by: amir07
2 Replies

9. Shell Programming and Scripting

awk to remove mutiple values from specific pattern, leaving a single value

In the awk below I am trying to remove all instances after a ; (semi-colon) or , (comma) in the ANN= pattern. I am using gsub to substitute an empty string in these, so that ANN= is a single value (with only one value in it the one right after the ANN=). Thank you :). I have comented my awk and... (11 Replies)
Discussion started by: cmccabe
11 Replies

10. UNIX for Beginners Questions & Answers

How to ignore mutiple strings when using shell script?

Hi All, I am trying to use below syntax to find ignore multiple locations while searching for a file. find / -name "$serviceitem" ! -size 0 2>&1 |egrep -v "tmp|docker|WinSxS|Permission|HISTORY|alternatives|bearer11ssl|manifest" I tried to assign all the ignore strings to one variable... (2 Replies)
Discussion started by: sravani25
2 Replies
sattach(1)							  SLURM Commands							sattach(1)

NAME
sattach - Attach to a SLURM job step. SYNOPSIS
sattach [options] <jobid.stepid> DESCRIPTION
sattach attaches to a running SLURM job step. By attaching, it makes available the IO streams of all of the tasks of a running SLURM job step. It also suitable for use with a parallel debugger like TotalView. OPTIONS
-h, --help Display help information and exit. --input-filter[=]<task number> --output-filter[=]<task number> --error-filter[=]<task number> Only transmit standard input to a single task, or print the standard output or standard error from a single task. The filtering is performed locally in sattach. -l, --label Prepend each line of task standard output or standard error with the task number of its origin. --layout Contacts the slurmctld to obtain the task layout information for the job step, prints the task layout information, and then exits without attaching to the job step. --pty Execute task zero in pseudo terminal. Not compatible with the --input-filter, --output-filter, or --error-filter options. Notes: The terminal size and resize events are ignored by sattach. Proper operation requires that the job step be initiated by srun using the --pty option. Not currently supported on AIX platforms. -Q, --quiet Suppress informational messages from sattach. Errors will still be displayed. -u, --usage Display brief usage message and exit. -V, --version Display SLURM version number and exit. -v, --verbose Increase the verbosity of sattach's informational messages. Multiple -v's will further increase sattach's verbosity. INPUT ENVIRONMENT VARIABLES
Upon startup, salloc will read and handle the options set in the following environment variables. Note: Command line options always over- ride environment variables settings. SLURM_EXIT_ERROR Specifies the exit code generated when a SLURM error occurs (e.g. invalid options). This can be used by a script to distinguish application exit codes from various SLURM error conditions. EXAMPLES
sattach 15.0 sattach --output-filter 5 65386.15 COPYING
Copyright (C) 2006-2007 The Regents of the University of California. Copyright (C) 2008-2009 Lawrence Livermore National Security. Pro- duced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). CODE-OCEC-09-009. All rights reserved. This file is part of SLURM, a resource management program. For details, see <http://www.schedmd.com/slurmdocs/>. SLURM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. SLURM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. SEE ALSO
sinfo(1), salloc(1), sbatch(1), squeue(1), scancel(1), scontrol(1), slurm.conf(5), sched_setaffinity (2), numa (3) June 2010 SLURM 2.2 sattach(1)
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy