On 3/29/2008 9:22 AM, twf_cc wrote:
> On 3$B7n(B29$BF|(B, $B>e8a(B11$B;~(B59$BJ,(B, Ed Morton
<mor...@[EMAIL PROTECTED]
> wrote:
>
>>On 3/28/2008 10:56 PM, twf_cc wrote:
>>
>>
>>
>>
>>>I have set enviroment AWKPATH in ~/.bash_profile including ~/lib/awk
>>>which contains some function
>>>at command line using, there's no problem.
>>>fang@[EMAIL PROTECTED]
~
>>>$ uname -a
>>>CYGWIN_NT-5.1 bash 1.5.25(0.156/4/2) 2008-03-05 19:27 i686 Cygwin
>>
>>>fang@[EMAIL PROTECTED]
~
>>>$ echo $AWKPATH
>>>/usr/lib/awk:/home/fang/lib/awk
>>
>>>fang@[EMAIL PROTECTED]
~
>>>$ echo abcd |awk -f reverse.awk --source '{print reverse($0)}'
>>>dcba
>>
>>>put in a file ,I get an error
>>
>>>fang@[EMAIL PROTECTED]
~
>>>$ cat junk
>>>#! /bin/gawk -f reverse.awk --source
>>
>>> {
>>> print reverse($0)
>>> }
>>
>>>fang@[EMAIL PROTECTED]
~
>>>$ echo abcd |./junk
>>>gawk: fatal: can't open source file ` reverse.awk --source ' for
>>>reading (No such file or directory)
>>
>>>calling gawk from shell, there's no problem
>>
>>>$ cat junk2
>>>#! /bin/bash
>>
>>>gawk -f reverse.awk --source '{print reverse($0)}'
>>
>>>fang@[EMAIL PROTECTED]
~
>>>$ echo abcd | ./junk2
>>>dcba
>>
>>>how to solve the problem, thanks
>>
>>You probably haven't ex****ted AWKPATH. This is more of an OS-specific
issue and
>>so is OT here so follow up at comp.unix.shell if that's not it.
>>
>> Ed.
>
>
> I have ex****t enviroment var in bash_profile
<snip>
> any ideas? thanks
As I said, if that isn't the problem, follow up at comp.unix.shell.
Ed.


|