Re: parallel bash scripts

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

 



On Wed, Mar 28, 2012 at 01:06, bruce <badouglas@xxxxxxxxx> wrote:
> but the script is a long running script, and i want to see the output
> as the script is running without having to hit the keyboard..

I'm not sure what you mean. Do you mean to say you want to run the
script and start seeing the output with the same command? If that is
the case, there are several solutions. I usually use these two:

$ nohup myscript &> myscript.log & less +F myscript.log
$ nohup myscript 2>&1 | tee myscript.log

If you actually want to run both scripts in the same shell and want to
follow both outputs, try the following variation of the first command:

$ nohup myscript1 &> myscript1.log & nohup myscript2 &> myscript2.log
& less +F myscript1.log myscript2.log

Then you can stop following the first log by hitting Ctrl+c and move
on to the next file with :n you can then start following with F. You
can go back again by repeating the same except change :n to :p.

Hope this helps.

-- 
Suvayu

Open source is the future. It sets us free.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux