Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Nohup

  • 04-09-2008 09:52AM
    #1
    Registered Users, Registered Users 2 Posts: 1,231 ✭✭✭


    Guys,

    Quick question for you all....

    I have 3 scripts in a directory that i regularly run with the command nohup. Everything runs fine. The problem is that they all write to nohup.out. It makes it very confusing trying to read the file.

    Is it possible that I can configure it that script 1 writes to nohup.out1 , script2 writes to nohup.out2 etc? It would make things alot easier for me.

    Thanks,
    Steve


Comments

  • Closed Accounts Posts: 12,807 ✭✭✭✭Orion


    nohup uses standard output. So just redirect each script to another file.

    nohup script1 >> output1 &
    nohup script2 >> output2 &
    etc

    [edit]changed commands - you'll want to append not overwrite so use >> not >


  • Registered Users, Registered Users 2 Posts: 1,231 ✭✭✭stereo_steve


    Thanks Macros42 that makes perfect sense!


Advertisement