Output

command [argument] The job can be specified by a command line argument command, or through the standard input if the command is not present on the command line. The command can be anything that is provided to a UNIX Bourne shell (see sh(1)). command is assumed to begin with the first word that is not part of a bsub option. All arguments that follow command are provided as the arguments to the command.

The job command can be up to 4094 characters long for UNIX and Linux or up to 255 characters for Windows. If no job name is specified with -J, bjobs, bhist and bacct displays the command as the job name.

If the batch job is not given on the command line, bsub reads the job commands from standard input. If the standard input is a controlling terminal, the user is prompted with bsub> for the commands of the job. The input is terminated by entering CTRL-D on a new line. You can submit multiple commands through standard input.

The commands are executed in the order in which they are given. bsub options can also be specified in the standard input if the line begins with #BSUB; e.g., #BSUB -x. If an option is given on both the bsub command line, and in the standard input, the command line option overrides the option in the standard input. The user can specify the shell to run the commands by specifying the shell path name in the first line of the standard input, such as #!/bin/csh. If the shell is not given in the first line, the Bourne shell is used. The standard input facility can be used to spool a user’s job script; such as bsub < script.

See Examples for examples of specifying commands through standard input.

Output

If the job is successfully submitted, displays the job ID and the queue to which the job has been submitted.

Examples

bsub sleep 100

Submit the UNIX command sleep together with its argument 100 as a batch job.

bsub -q short -o my_output_file "pwd; ls"

Submit the UNIX command pwd and ls as a batch job to the queue named short and store the job output in my_output file.

bsub -m "host1 host3 host8 host9" my_program

Submit my_program to run on one of the candidate hosts: host1, host3, host8 and host9.

bsub -q "queue1 queue2 queue3" -c 5 my_program

Submit my_program to one of the candidate queues: queue1, queue2, and queue3 which are selected according to the CPU time limit specified by -c 5.

bsub -I ls

Submit a batch interactive job which displays the output of ls at the user’s terminal.

bsub -Ip vi myfile

Submit a batch interactive job to edit myfile.

bsub -Is csh

206Platform LSF Command Reference