Rohan
Rohan

Reputation: 73

redirecting the output of shell command to &- what does it mean

I am new to shell scripting and having a doubt regarding the usage of &-

I have a shell script with a single line: echo Hello. The shell script is named demo.sh

What does it do when it is executed as:

./demo.sh 0>&-

Thanks.

Upvotes: 0

Views: 71

Answers (1)

Erki Aring
Erki Aring

Reputation: 2096

It closes the file descriptor - standard input (0) in this case.

See also:

Upvotes: 2

Related Questions