Re: awk progfile

1999-06-04 Thread Thomas Keusch
On Thu, Jun 03, 1999 at 01:50:57PM -0500, James Frey wrote: > If I put: " /Date/ respaldo " in a file (respchk) and run > awk -f respchk well, awk needs to know what input to process: awk -f program.awk input.data or simply pipe the input to awk: cat data | awk -f prog.awk -- thomas.

awk progfile

1999-06-04 Thread James Frey
Thank you, Andreas - That was it. I just don´t know how to read. Jim

Re: awk progfile

1999-06-04 Thread Colin Marquardt
>> What's the standard "#! " way to get a script running on both? ln -s >> /usr/bin/ /bin/ in Debian (and vice versa in other systems)? >> (please cc me) For Perl, the Camel book has something like this: | eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $ | argv:q

Re: awk progfile

1999-06-04 Thread Carl Mummert
>BTW: Can somebody give me a clue why awk is /usr/bin/awk in Debian (also >e.g., ksh) (and /bin/awk in most other systems I've seen)? >What's the standard "#! " way to get a script running on both? ln -s >/usr/bin/ /bin/ in Debian (and vice versa in other systems)? >(please cc me) Debian tries to

RE: awk progfile

1999-06-04 Thread Huggel, Andreas
> What's happening? 1) $ awk '/Date/' respaldo Runs awk with the program-text "/Date/" on the input-file respaldo. This program is only a pattern. The default action is to print the entire line of the input-file to the screen if the pattern matches. 2) $ cat respchk /Date/ respaldo $ awk -f

Re: awk progfile

1999-06-04 Thread Brad
On Thu, 3 Jun 1999, James Frey wrote: > You are right, its /usr/bin/awk. Now, with ./respchk I get: > > awk: 1: unexpected character '.' When i was testing a similar script, i got the same error whenever i would try to specify an actual filename inside the script. That's why i menti

Re: awk progfile

1999-06-04 Thread James Frey
You are right, its /usr/bin/awk. Now, with ./respchk I get: awk: 1: unexpected character '.' Jim Brad wrote: > > Lazarus Long wrote: > > > > > I don't know awk, but: > > > > > > 1) you want > > > #!/bin/awk > > Actually, you probalby want /usr/bin/awk o

Re: awk progfile

1999-06-03 Thread Brad
> Lazarus Long wrote: > > > I don't know awk, but: > > > > 1) you want > > #!/bin/awk Actually, you probalby want /usr/bin/awk on a Debian system. "which awk" to find out. The space shouldn't matter, although it might. Also, i don't think that you can specify the fil

Re: awk progfile

1999-06-03 Thread James Frey
Thanks for the quick response, I'm amazed. Yes, I did that, with the same results. Forgot to mention I´m using slink, and it does the same thing with HPUX. Lazarus Long wrote: > On Thursday, June 03, 1999 at 13:50:57 -0500, James Frey wrote: > > Message-ID: <[EMAIL PROTECTED]> > > X-Mailer:

awk progfile

1999-06-03 Thread James Frey
Hola, I can't get awk to run from a program file. From the command line, awk '/Date/' respaldo works fine. If I put: " /Date/ respaldo " in a file (respchk) and run awk -f respchk it hangs. If I put: " #! /bin/awk " on the first line and try to run it with ./respchk I get "No such file