Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Multiple cmd windows in a .bat file?


  • Please log in to reply
4 replies to this topic

#1 kanderna

kanderna

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:12:51 AM

Posted 23 May 2005 - 01:56 PM

Hi All,

I'm trying to create a .bat file that will open multiple tail sessions in multiple windows. I am using a windows version of tail. My problem is that I'm using 'tail -f,' so the .bat file is waiting for control to be returned from the tail command instead of moving on and opening the remaining tail sessions. Any idea how I can remedy this? Thanks!

BC AdBot (Login to Remove)

 


#2 Rimmer

Rimmer

  • Members
  • 2,159 posts
  • OFFLINE
  •  
  • Location:near Sydney, Australia
  • Local time:03:51 PM

Posted 23 May 2005 - 08:29 PM

I've never heard of tail, what does it do? What is the -f switch for?

Soltek QBIC, Pentium 4 3.0GHz, 512MB RAM, 200GB SATA HDD, ATI Radeon 9600XT 256MB, Netgear 54Mb/s WAP, ridiculously expensive Satellite Broadband
Windows XP Home SP2, Trend Micro Internet Security, Firefox, Thunderbird, AdAwareSE, Spybot S&D, SpywareBlaster, A-squared Free, Ewido Security Suite.

#3 kanderna

kanderna
  • Topic Starter

  • Members
  • 7 posts
  • OFFLINE
  •  
  • Local time:12:51 AM

Posted 23 May 2005 - 08:41 PM

tail is a UNIX command that allows you to view the last 10 (default) lines of a file (.log, .txt, etc.). Some people love this command so much that they have to use it in Windows as well. The '-f' switch means follow, and it allows you to monitor the log or txt file as it's being written to in "real time." So, when I add the -f switch, the tail command never "exits."

Edited by kanderna, 23 May 2005 - 08:42 PM.


#4 Rimmer

Rimmer

  • Members
  • 2,159 posts
  • OFFLINE
  •  
  • Location:near Sydney, Australia
  • Local time:03:51 PM

Posted 23 May 2005 - 10:11 PM

Are you using the START command?

If you want to monitor several log files in real time perhaps you could use the tail command without -f and put a loop in the batch file so the windows are refreshed every few seconds? Not very elegant though.

Hopefully someone else will be able to throw some light on the problem, while I'm trying to work it out.

Soltek QBIC, Pentium 4 3.0GHz, 512MB RAM, 200GB SATA HDD, ATI Radeon 9600XT 256MB, Netgear 54Mb/s WAP, ridiculously expensive Satellite Broadband
Windows XP Home SP2, Trend Micro Internet Security, Firefox, Thunderbird, AdAwareSE, Spybot S&D, SpywareBlaster, A-squared Free, Ewido Security Suite.

#5 Rimmer

Rimmer

  • Members
  • 2,159 posts
  • OFFLINE
  •  
  • Location:near Sydney, Australia
  • Local time:03:51 PM

Posted 25 May 2005 - 05:27 AM

Have you seen Tail for win32 at http://tailforwin32.sourceforge.net ? It looks like it can open multiple tail windows all within one windows windowed window. :thumbsup:

Soltek QBIC, Pentium 4 3.0GHz, 512MB RAM, 200GB SATA HDD, ATI Radeon 9600XT 256MB, Netgear 54Mb/s WAP, ridiculously expensive Satellite Broadband
Windows XP Home SP2, Trend Micro Internet Security, Firefox, Thunderbird, AdAwareSE, Spybot S&D, SpywareBlaster, A-squared Free, Ewido Security Suite.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users