awk problem

awk problem

am 21.10.2007 17:59:16 von franzi

Why running awk i got that kid of problem?
bash: /usr/bin/awk: cannot execute binary file
i'm under macosx tiger and the filesystem is in writeable mode

Re: awk problem

am 21.10.2007 18:43:34 von Janis Papanagnou

franzi wrote:
> Why running awk i got that kid of problem?
> bash: /usr/bin/awk: cannot execute binary file
> i'm under macosx tiger and the filesystem is in writeable mode

You are trying to execute binary data from your shell?
How did you make the call? (Provide all necessary information.)

Janis

Re: awk problem

am 21.10.2007 18:47:34 von Stephane CHAZELAS

2007-10-21, 15:59(-00), franzi:
> Why running awk i got that kid of problem?
> bash: /usr/bin/awk: cannot execute binary file
> i'm under macosx tiger and the filesystem is in writeable mode

bash returns that message when the system doesn't recognise the
file as an executable one (one in the format of executable files
it recognises, such as ELF files or files starting with a #!
line) and bash itself doesn't want to execute it itself (as a
bash script) (because it is a binary file; and the test bash
uses to recognise whether it's a binary file or not is to check
whether the first line contains a NUL character).

So it would seem your /usr/bin/awk file got corrupted or
something like that.

Can you execute it from another shell?

What does "file /usr/bin/awk" tell you?

--
Stéphane

Re: awk problem

am 22.10.2007 07:57:41 von franzi

On 21 Ott, 18:47, Stephane CHAZELAS wrote:
> 2007-10-21, 15:59(-00), franzi:
>
> > Why running awk i got that kid of problem?
> > bash: /usr/bin/awk: cannot execute binary file
> > i'm under macosx tiger and the filesystem is in writeable mode
>
> bash returns that message when the system doesn't recognise the
> file as an executable one (one in the format of executable files
> it recognises, such as ELF files or files starting with a #!
> line) and bash itself doesn't want to execute it itself (as a
> bash script) (because it is a binary file; and the test bash
> uses to recognise whether it's a binary file or not is to check
> whether the first line contains a NUL character).
>
> So it would seem your /usr/bin/awk file got corrupted or
> something like that.
>
> Can you execute it from another shell?
>
> What does "file /usr/bin/awk" tell you?
>
> --
> St=E9phane

that it's a data file
i ported gawk,but i di not understand wthat's wrong under
macosx10.4.10
i compiled the kernel an yaer ago but it seems not to mhave any
problem
thanks in advance

Re: awk problem

am 22.10.2007 09:44:03 von Stephane CHAZELAS

2007-10-22, 05:57(-00), franzi:
> On 21 Ott, 18:47, Stephane CHAZELAS wrote:
>> 2007-10-21, 15:59(-00), franzi:
>>
>> > Why running awk i got that kid of problem?
>> > bash: /usr/bin/awk: cannot execute binary file
>> > i'm under macosx tiger and the filesystem is in writeable mode
>>
>> bash returns that message when the system doesn't recognise the
>> file as an executable one (one in the format of executable files
>> it recognises, such as ELF files or files starting with a #!
>> line) and bash itself doesn't want to execute it itself (as a
>> bash script) (because it is a binary file; and the test bash
>> uses to recognise whether it's a binary file or not is to check
>> whether the first line contains a NUL character).
>>
>> So it would seem your /usr/bin/awk file got corrupted or
>> something like that.
>>
>> Can you execute it from another shell?
>>
>> What does "file /usr/bin/awk" tell you?
[...]
> that it's a data file
> i ported gawk,but i di not understand wthat's wrong under
> macosx10.4.10
> i compiled the kernel an yaer ago but it seems not to mhave any
> problem
[...]

As Janis suggested, it may also be because you're trying to do:

bash /usr/bin/awk

That is ask bash to interpret /usr/bin/awk as a bash script.
bash will refuse as obviously /usr/bin/awk is not a script but a
binary command on its own.

--
Stéphane

Re: awk problem

am 23.10.2007 08:09:23 von franzi

On 22 Ott, 09:44, Stephane CHAZELAS wrote:
> 2007-10-22, 05:57(-00), franzi:
>
>
>
> > On 21 Ott, 18:47, Stephane CHAZELAS wrote:
> >> 2007-10-21, 15:59(-00), franzi:
>
> >> > Why running awk i got that kid of problem?
> >> > bash: /usr/bin/awk: cannot execute binary file
> >> > i'm under macosx tiger and the filesystem is in writeable mode
>
> >> bash returns that message when the system doesn't recognise the
> >> file as an executable one (one in the format of executable files
> >> it recognises, such as ELF files or files starting with a #!
> >> line) and bash itself doesn't want to execute it itself (as a
> >> bash script) (because it is a binary file; and the test bash
> >> uses to recognise whether it's a binary file or not is to check
> >> whether the first line contains a NUL character).
>
> >> So it would seem your /usr/bin/awk file got corrupted or
> >> something like that.
>
> >> Can you execute it from another shell?
>
> >> What does "file /usr/bin/awk" tell you?
> [...]
> > that it's a data file
> > i ported gawk,but i di not understand wthat's wrong under
> > macosx10.4.10
> > i compiled the kernel an yaer ago but it seems not to mhave any
> > problem
>
> [...]
>
> As Janis suggested, it may also be because you're trying to do:
>
> bash /usr/bin/awk
>
> That is ask bash to interpret /usr/bin/awk as a bash script.
> bash will refuse as obviously /usr/bin/awk is not a script but a
> binary command on its own.
>
> --
> St=E9phane- Nascondi testo tra virgolette -
>
> - Mostra testo tra virgolette -

So how can i solve that?
needing some light
thanks alot

Re: awk problem

am 23.10.2007 10:17:18 von Stephane CHAZELAS

2007-10-23, 06:09(-00), franzi:
[...]
>> bash /usr/bin/awk
>>
>> That is ask bash to interpret /usr/bin/awk as a bash script.
>> bash will refuse as obviously /usr/bin/awk is not a script but a
>> binary command on its own.
[...]
> So how can i solve that?
[...]

The syntax:

bash some-file

is to run a shell that interprets a file as a list of commands
to run (a script).

To start a ls or bash command, you don't do:

bash /bin/ls
or
bash /usr/bin/bash

Ou do

ls
or
bash

why would it be different with awk?

--
Stéphane

Re: awk problem

am 23.10.2007 13:59:07 von franzi

On 23 Ott, 10:17, Stephane CHAZELAS wrote:
> 2007-10-23, 06:09(-00), franzi:
> [...]>> bash /usr/bin/awk
>
> >> That is ask bash to interpret /usr/bin/awk as a bash script.
> >> bash will refuse as obviously /usr/bin/awk is not a script but a
> >> binary command on its own.
> [...]
> > So how can i solve that?
>
> [...]
>
> The syntax:
>
> bash some-file
>
> is to run a shell that interprets a file as a list of commands
> to run (a script).
>
> To start a ls or bash command, you don't do:
>
> bash /bin/ls
> or
> bash /usr/bin/bash
>
> Ou do
>
> ls
> or
> bash
>
> why would it be different with awk?
>
> --
> St=E9phane

ok Compri'