-1
$ bash date /bin/date: /bin/date: cannot execute binary file $ bash -c date Thu Apr 14 19:27:08 EDT 2016 

What does the error message of bash date mean? What does bash expect date to be?

0

1 Answer 1

3

The reason bash throws this error is becaue /bin/date is a binary file. It expects it to be a shell script, and it would work if it was.

bash file 

means you execute a shell script called file, but with -c it reads the input as a sequence of bash commands.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.