Re: : bash command help - nohup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30Oct2009 09:42, Dan Track <dan.track@xxxxxxxxx> wrote:
| Hi,
| 
| I'm trying to run mutliple commands from the command line while using
| nohup. But I can't seem to get the syntax right, can someone please
| correct this for me
| 
| nohup cmd 1;cm2;cmd3
| 
| All i get is that cmd1 runs from wiht nohup but the rest run in my
| current shell. I'd like all to be run with the single nohup command,
| any thoughts?

Syntacticly that's three command. A semicolon is like a newline, so its
as though you've typed:

  nohup cmd 1
  cmd2
  cmd3

Since nohup expects one command, you need one command. SInce you want
three, invoke the shell as your command:

  nohup sh -c 'cmd1; cmd2; cmd3'

Cheers,
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

There are three kinds of lies: lies, damned lies, and statistics.
        - Benjamin Disraeli

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux