Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8435819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:01:08+00:00 2026-06-10T07:01:08+00:00

Say I submit a job using something like bsub pwd . Now I would

  • 0

Say I submit a job using something like bsub pwd. Now I would like to get the job ID of that job in order to build a dependency for the next job. Is there some way I can get bsub to return the job ID?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:01:10+00:00Added an answer on June 10, 2026 at 7:01 am

    Just as a reference, this is the best solution I could come up with so far. It takes advantage of the fact that bsub write a line containing the ID to STDOUT.

    function nk_jobid {
        output=$($*)
        echo $output | head -n1 | cut -d'<' -f2 | cut -d'>' -f1
    }
    

    Usage:

    jobid=$(nk_jobid bsub pwd)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have: <form method=get action=something.php> <input type=text name=name /> </form> <input type=submit />
Lets say there is a form with a submit button. I found out that
What does the HTML spec say about using enter key to submit a form?
Let's say I have an application that utilizes the Executor framework as such Executors.newSingleThreadExecutor().submit(new
Let's say I have the following scenario: <form action=/something.php method=GET>Click me</div> <script type=text/javascript><!-- $('form').submit(function(e)
Say I submit a simple page (that has no parameters, no forms, etc, and
Let's say I'm at http://www.domain.com/page.html . I want to submit this form: <FORM METHOD=post
I have one ArrayList in Session, lets say for example [305,306,380] . On submit,
Say we have deep hashes like: b = {1 => {2 => {} },
Say i have a few fields like the following: abd738927 jaksm234234 hfk342 ndma0834 jon99322

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.