08-15-2011
Passing a variable to #BSUB -n in a LSF file
Hi There!
I'm writing this LSF script to make it easier to send jobs to a cluster when varying certain parameters. At one point I'd like to do something like:
set NPROC = 10
and later on call BSUB using something like:
#BSUB -n $NPROC
unfortunately for me, this throws an error:
Bad argument for option -n. Job not submitted.
Anyone with an idea on how to pass BSUB a variable? With this example it sounds sort of roundabout, but sometimes you want to do some arithmetic with $NPROC before passing it to #BSUB and then being able to do it this way may be something very useful.
Thanks!
---------- Post updated at 06:01 PM ---------- Previous update was at 05:57 PM ----------
Sorry, I read the post back and I wanted to make sure the problem is clear, this works straight away:
#BSUB -n 10
This doesn't work
set NPROC = 10
#BSUB -n $NPROC
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I want to input unix variable to sqlplus.The following is working fine
sqlplus username/password @dummy.sql param1 param2 << EOF
create user $1 identified by $2;
EOF
But I dont want any file name to be passed,I just want to pass the parameter. Is there any way to that??
Thanks... (3 Replies)
Discussion started by: sakthi.abdullah
3 Replies
2. Shell Programming and Scripting
Hi,
In normal shell scripting, how do you pass the output of a command to a variable, instead of a file and be able to use it later?
The code is:
#!/bin/bash
who | cut -d" " -f1 > onlineusers
Instead of passing the output of the above command to the file called 'onlineusers'... (1 Reply)
Discussion started by: Furqan_79
1 Replies
3. Shell Programming and Scripting
Hi all,
I have a script in file1 which gets input from the user say variable "TYPE". This variable is present in the other file2. I want to replace the variable in the file2 with the value given by the user and print the file. How can I achieve this task?
file1
code
echo "Give... (3 Replies)
Discussion started by: Ananthdoss
3 Replies
4. Shell Programming and Scripting
Hi,
How can I modify the FILETYPE command ?
I want to provide the file extension, like txt, root .?
Thanks,
#!/bin/bash
FROM=$1
TO=$2
FILETYPE=$3
... (4 Replies)
Discussion started by: nrjrasaxena
4 Replies
5. Programming
All,
I have a log file containing lots of data now i want to extract all text between block below(names) without the title or end pattern but only names,
++++START++++
SCOTT TIGER
HENRY PAUL
JARED OTIENO
OMOLLO JA NIGERIA
++++END++++
the names i want to return and store in a variable in... (1 Reply)
Discussion started by: Scott2000
1 Replies
6. Shell Programming and Scripting
Hi Guys,
i have a file where data is in the below format::
data1 data2
data3 data4
data4 data6
my script written as::
#!/bin/ksh
cd $1
at now <<END
sh $2
END
Here i want to pass the values stored in the above file one by one till the end of line.
Here if i am doing it as:: (2 Replies)
Discussion started by: Atp3530
2 Replies
7. Shell Programming and Scripting
cat a1
scott
robert
tom
test
script :
#!/usr/bin/ksh
for NAME in `cat a1`
do
VALUE=`sqlplus -silent "nobody/bobody01@testq" <<END
set pagesize 0 feedback off verify off heading off echo off
select username from dba_users where username=upper('$NAME');
END`
if ; then
echo... (3 Replies)
Discussion started by: jhonnyrip
3 Replies
8. Shell Programming and Scripting
Hi all,
I have a file looks like
AAAA 111
BBBB 222
CCCC 333
need to pass variable value like var1=AAAA and var2=111
to another command for three times with next values.
stuck over here
cat file | while read line
do
export var1=`awk '{print $1}'`
echo $var1
export var2=`cat file... (3 Replies)
Discussion started by: rakeshtomar82
3 Replies
9. Shell Programming and Scripting
The red text at the bottom represents the three lines I want to address.
I'm dynamically creating a bsub with a perl script and would like to create the fasta_16S variable in a single line....not three. I'm having difficulty in getting the syntax correct. Obviously, there is some confusion... (3 Replies)
Discussion started by: jdilts
3 Replies
10. UNIX for Beginners Questions & Answers
Below is the command
mv AP_FLEXCUBE_INTERFACE10.txt FTPYMNTE_`date "+%Y%m%d%H%M%S" | tr '' ''`.TXT
it is changing the file name to a different name according to time stamp dynamically. I want to capture that dynamic file name present in the directory to a variable .
After that i want to... (6 Replies)
Discussion started by: sujit das
6 Replies
ALEF(1) General Commands Manual ALEF(1)
NAME
8al, kal, val - ALEF compilers
SYNOPSIS
8al [ option ... ] [ file ... ]
kal [ option ... ] [ file ... ]
val [ option ... ] [ file ... ]
DESCRIPTION
ALEF is a concurrent programming language with a syntax like C's. Kal, val and 8al compile the named ALEF source files into SPARC, MIPS
and Intel 386 object files. Source files have the extension .l. The ALEF source is passed through cpp(1) prior to compilation. Object
files have the normal extension for each architecture: .k for SPARC, .v for MIPS and .8 for 386. Up to $NPROC files will be compiled in
parallel.
The compiler options are:
-o obj Place output in file obj (ignored if there is more than one input file). Default is to take the last element of the input pathname,
strip any trailing .l, and append the object file suffix.
-a Write no object file, but produce an acid(1) program on standard output, comprising a set of type declarations and functions to
print those types.
-aa Like -a but suppress output for types and functions declared in header files.
-w Print warning messages for non fatal errors.
-N Do not run the code optimizer.
-c Do not compile code for check statements.
-S Produce assembly language instead of object code as output. By default, output goes to a file named by the last element of the
input pathname with .l replaced by .s.
-Dname=def
-Dname Define the name to the preprocessor, as if by If no definition is given, the name is defined as
-Idir files whose names do not begin with are always sought first in the directory of the file argument, then in directories named in -I
options, then in /sys/include/alef, and finally in /$objtype/include/alef.
-dc Produce various forms of debugging. The character c is an alphabetic.
The compiler recognizes several #pragma directives. The first, #pragma lib, is the same as in 2c(1). The others have effect only when
profiling is turned on by the -p option of the loader (see 2l(1)). The directive #pragma noprofile disables the generation of profiling
code for subsequently declared functions; #pragma profile enables it again. The main use of these directives is to avoid the profiling
confusion caused by functions that do not explicitly return, such as the task-switching functions in the run-time system. Nonetheless,
without support for profiling multi-process programs, it remains difficult to profile Alef programs.
EXAMPLE
To compile and run on a SPARC the ALEF program in the current directory:
kal -w *.l
kl *.k
k.out
FILES
/sys/include/alef
directory for #include files.
/$objtype/lib/alef
directory for ALEF libraries
SOURCE
/sys/src/alef/port
machine-independent part
/sys/src/alef/8, etc.
machine-dependent parts
SEE ALSO
acid(1), 2a(1), 2l(1), mk(1), nm(1), db(1)
Phil Winterbottom, ``Alef Reference Manual'', and Bob Flandrena, ``Alef User's Guide''.
ALEF(1)