Watching a file


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From - Mon Feb 21 07:12:47 2000
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000 Message-ID: <38B12BA0.C10D36AC@aplawrence.com>
Date: Mon, 21 Feb 2000 07:12:16 -0500
From: Tony Lawrence <tony@aplawrence.com>
Organization: A.P. Lawrence
X-Mailer: Mozilla 4.7 [en] (X11; I; SCO_SV 3.2 i386)
X-Accept-Language: en
MIME-Version: 1.0
To: "fuzzy@tampabay.rr.com" <fuzzy@tampabay.rr.com>
Subject: Re: SCO question References: <01BF7B8C.4413A800.fuzzy@tampabay.rr.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Hate these ads?



jmt wrote:

> Hey Tony,

> Actually, this will work out very well. I only need to watch 1 file in 1
> directory. What is going to happen, another running application on the same
> SCO box will be generating a print file. Once I see that print file, I'll
> send it (TCP/IP) to a WinNT box for processing. Yea, your going to ask me
> why can't that other app send it? The client doesn't want to be involved in
> writing any code to send the file to our WinNT Box. Now after the WinNT box
> processess the print file by adding extra things on it, etc.. the WinNT box
> will send it back to me than I will print it out.















That will work fine as long as you know when the sending
part is done.  However, you may not even need to go to that
complexity.  If the client prints to a named pipe and sends
its output there, a simple shell script will do what you
want.  Try this:



mknod /tmp/np p



cat > /tmp/myprog
while true
 do
 while read line
  do
   echo $line 
  done >> /tmp/myfile$$
 cat /tmp/myfile$$
 done
<CTRL-D>
chmod 755 /tmp/myprog
/tmp/myprg < /tmp/np



Now, from some other screen, cp files to /tmp/np.  All this
requires is that the client closes the file when its done
printing.











-- 
Tony Lawrence (tony@aplawrence.com)
SCO/Linux articles, help, book reviews, tests, 
job listings and more : 







Comments /Bofcusm/277.html


Add your comments

Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


Views for this page
Today This Week This Month This Year  Overall
136305 1,483

/Bofcusm/277.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

More:
       - OSR5




Unix/Linux Consultants

Your ad here - $24.00 yearly!

http://bcstechnology.net Full service Linux & UNIX systems integrator; Windows to UNIX/Linux Client-Server Specialist; Secure E-Mail & Website Hosting; Thoroughbred Software Developer; Custom Industrial Automation; Hardware & Electronics Experts; In Business Since 1985.


SCO, OpenServer, UnixWare, software, servers, security, networks, installation, administration, troubleshooting, maintenance, Watchguard, firewalls, VPNs, e-mail. Visit us at http://opensystemscomputing.com and www.go2unix.com.


http://www.schewanick.com SCO Unix, Solaris, Linx (various), PHP, MySQL, Apache, uniBasic, dL4, Perl, System Administration and more....




card_image








Change Congress


Related Posts