Sponsored Content
Top Forums Shell Programming and Scripting Request for help with SGE submission script manipulation Post 302565802 by rdcwayx on Tuesday 18th of October 2011 08:29:41 PM
Old 10-18-2011
By shell:

Code:
cat template

#!/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 $HOME/bin/new_vasp

Code:
for (( i=1; i<=101; i++ ))
do 
  n=$(printf "c%04d" $i)
  f=$(printf "%04d" $i)
  sed "s/c0001/$n/" template > script_$f 
done

This User Gave Thanks to rdcwayx For This Post:
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help in job submission!

I am attempting to submit alot of jobs to this CONDOR program, in which it utilizes alot of computers and puts a single job onto each. Anyways, im trying to use the same program (autodock) to analyze different input files (dpf files), where each input file has a different name but same file... (0 Replies)
Discussion started by: olifu02
0 Replies

2. UNIX for Dummies Questions & Answers

g03 problems on rocks 5.3 with sge queue.

Dear all, I'm a new guy doing some quntum calculation with gaussian on my rocks clusters. Recently, my cluster upgraded to rocks 5.3, but something strange happened. Everything goes correct except a serious problem. when I summit my gaussian job with script to sge queue, the job does run,... (0 Replies)
Discussion started by: liuzhencc
0 Replies

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

4. UNIX for Dummies Questions & Answers

Text manipulation help request

Hello Unix.com I want to know how can I extract from a large email list only the users. 1@a.com 2@b.com 3@c.com I want to extract only 1, 2, 3. Thanks in advance. Galford D. Weller (2 Replies)
Discussion started by: galford
2 Replies

5. UNIX for Beginners Questions & Answers

Sun Grid Engine (SGE) scripts - processors?

Hi, I was trying to run a program that calls 8 processors (with max. RAM of 2 GB per processor). I want to run this program on my cluster that runs SGE. The cluster has 2 nodes, and each node has 62 cores, and 248GB/node. Currently, I use the scripts below, but the program (softx below) crashes... (0 Replies)
Discussion started by: pc2001
0 Replies

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

7. 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
NPM-RUN-SCRIPT(1)                                                                                                                NPM-RUN-SCRIPT(1)

NAME
npm-run-script - Run arbitrary package scripts SYNOPSIS
npm run-script <command> [--silent] [-- <args>...] alias: npm run DESCRIPTION
This runs an arbitrary command from a package's "scripts" object. If no "command" is provided, it will list the available scripts. run[-script] is used by the test, start, restart, and stop commands, but can be called directly, as well. When the scripts in the package are printed out, they're separated into lifecycle (test, start, restart) and directly-run scripts. As of ` https://blog.npmjs.org/post/98131109725/npm-2-0-0, you can use custom arguments when executing scripts. The special option -- is used by getopt https://goo.gl/KxMmtG to delimit the end of the options. npm will pass all the arguments after the -- directly to your script: npm run test -- --grep="pattern" The arguments will only be passed to the script specified after npm run and not to any pre or post script. The env script is a special built-in command that can be used to list environment variables that will be available to the script at run- time. If an "env" command is defined in your package, it will take precedence over the built-in. In addition to the shell's pre-existing PATH, npm run adds node_modules/.bin to the PATH provided to scripts. Any binaries provided by locally-installed dependencies can be used without the node_modules/.bin prefix. For example, if there is a devDependency on tap in your package, you should write: "scripts": {"test": "tap test/*.js"} instead of "scripts": {"test": "node_modules/.bin/tap test/*.js"} to run your tests. The actual shell your script is run within is platform dependent. By default, on Unix-like systems it is the /bin/sh command, on Windows it is the cmd.exe. The actual shell referred to by /bin/sh also depends on the system. As of ` https://github.com/npm/npm/releases/tag/v5.1.0 you can customize the shell with the script-shell configuration. Scripts are run from the root of the module, regardless of what your current working directory is when you call npm run. If you want your script to use different behavior based on what subdirectory you're in, you can use the INIT_CWD environment variable, which holds the full path you were in when you ran npm run. npm run sets the NODE environment variable to the node executable with which npm is executed. Also, if the --scripts-prepend-node-path is passed, the directory within which node resides is added to the PATH. If --scripts-prepend-node-path=auto is passed (which has been the default in npm v3), this is only performed when that node executable is not found in the PATH. If you try to run a script without having a node_modules directory and it fails, you will be given a warning to run npm install, just in case you've forgotten. You can use the --silent flag to prevent showing npm ERR! output on error. You can use the --if-present flag to avoid exiting with a non-zero exit code when the script is undefined. This lets you run potentially undefined scripts without breaking the execution chain. SEE ALSO
o npm help 7 scripts o npm help test o npm help start o npm help restart o npm help stop o npm help 7 config January 2019 NPM-RUN-SCRIPT(1)
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy