Re: awk problem



On 22 Ott, 09:44, Stephane CHAZELAS <this.addr...@xxxxxxxxxx> wrote:
2007-10-22, 05:57(-00), franzi:



On 21 Ott, 18:47, Stephane CHAZELAS <this.addr...@xxxxxxxxxx> 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- Nascondi testo tra virgolette -

- Mostra testo tra virgolette -

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

.



Relevant Pages

  • Re: HELP!! cannot execute binary file
    ... All the download binary file sudden can not execute.(Packages ... bash: ./filename: cannot execute binary file ... This executable is test OK when I download it. ...
    (comp.os.linux.misc)
  • Re: awk problem
    ... bash returns that message when the system doesn't recognise the ... uses to recognise whether it's a binary file or not is to check ... Can you execute it from another shell? ...
    (comp.unix.shell)
  • Re: [ Attn: Randy ] Ad-hoc Parsing?
    ... One of the biggest advantages of Unix-like shells ... > flexible as the Unix scripts using the more powerful ... about bash, which being a fully-capable shell, can launch programs ... > execute the com program itself). ...
    (alt.lang.asm)
  • Re: file permissions
    ... > and stumbled across a bash script operation ... > called fileperm. ... > If I attempt to execute the file. ...
    (comp.os.linux.misc)
  • Re: Linux Command: time NO OUTPUT POSSIBLE
    ... By creating the new bash it has worked. ... But I want to execute it automaticall and therefore I have decided to ... I don't have any objection to using the GNU time program (in fact I ... The previous line says that when you execute your script (i.e., ...
    (comp.os.linux.setup)