From owner-freebsd-questions Tue May 29 23:41:13 2001 Delivered-To: freebsd-questions@freebsd.org Received: from smtp016.mail.yahoo.com (smtp016.mail.yahoo.com [216.136.174.113]) by hub.freebsd.org (Postfix) with SMTP id 1E07737B422 for ; Tue, 29 May 2001 23:41:10 -0700 (PDT) (envelope-from sky_tracker@yahoo.com) Received: from hse-toronto-ppp3490789.sympatico.ca (HELO d.tracker) (65.92.121.72) by smtp.mail.vip.sc5.yahoo.com with SMTP; 30 May 2001 06:41:09 -0000 X-Apparently-From: Received: (from david@localhost) by d.tracker (8.11.3/8.11.3) id f4U7ers01871; Wed, 30 May 2001 07:40:53 GMT (envelope-from david) Date: Wed, 30 May 2001 02:40:52 -0500 From: David Banning To: Jonathan Chen Cc: David Banning , questions@FreeBSD.ORG Subject: Re: Bad system call - workaround help needed Message-ID: <20010530024052.B1823@yahoo.com> Reply-To: David Banning References: <20010529131934.A3725@yahoo.com> <20010530093613.B93515@itouchnz.itouch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20010530093613.B93515@itouchnz.itouch>; from jonathan.chen@itouch.co.nz on Wed, May 30, 2001 at 09:36:13AM +1200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I am actually using bash. I got it working. This is how; cat $1 > ~/printfile cat ~/printfile | lp -dlj -s & Thanks - On Wed, May 30, 2001 at 09:36:13AM +1200, Jonathan Chen wrote: > On Tue, May 29, 2001 at 01:19:35PM -0500, David Banning wrote: > > This SCO program I am running allows me to pipe my reports out to > > any program. I have to compile it into the database code, which is not > > open. I am piping to a printer but the program crashes. > > > > It works fine if I just pipe it to a shell script like this one; > > > > cat $1 > ~/printfile > > > > Then I can go "cat ~/printfile | lp -dlj -s" > > and it prints fine. > > > > But for some strange reason, if I expand the program to > > > > cat $1 > ~/printfile > > cat ~/printfile | lp -dlj -s > > > > the program crashes, > > with bad system call - signal 12 > > If you're using "~/printfile", it appears you're using the csh, how > about seeing whether it works with /bin/sh? > > ie: > #!/bin/sh > cat $1 > /tmp/printfile > cat /tmp/printfile | lp -dlj -s > > or even shorten it to: > > #!/bin/sh > lp -dlj -s > > -- > Jonathan Chen > ---------------------------------------------------------------------- > "If everything's under control, you're going too slow" > - Mario Andretti > -- Sooner or later you must pay for your sins. (Those who have already paid may disregard this fortune). _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message