bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

odd error from bash exec binary on cmd line


From: L A Walsh
Subject: odd error from bash exec binary on cmd line
Date: Sat, 24 Mar 2018 12:31:15 -0700
User-agent: Thunderbird

Using bash-4.4.12...

If I use bash -c, I get a variety of correct messages:

 bash -c xxx
bash: xxx: command not found

 touch xx
Ishtar:law/bin> bash -c xx
bash: ./xx: Permission denied

or when it works, it just does:
bash -c "sleep 1"
(sleeps 1)

but if I leave off the '-c', like:

bash sleep 1

I get:

/usr/bin/sleep: /usr/bin/sleep: cannot execute binary file

???
Isn't it bash that cannot execute the binary file because
it expected a script?

Shouldn't bash be to the left of the ':' with some
error on the right, like "cannot exec binary file" or
"expected script file"?







reply via email to

[Prev in Thread] Current Thread [Next in Thread]