elcharrua
elcharrua

Reputation: 1682

Bash script failing with -l -i parameters in shebang

I'm working on some bash files and I came upon the following:

#!/bin/bash -l -i

Whats does -l -i mean? The script fails it has those parameters but if I remove them the script works.

Upvotes: 1

Views: 518

Answers (1)

that other guy
that other guy

Reputation: 123670

Many OS including Linux only accept a single additional parameter in the shebang. Since these are both single flags without singles, you can combine them to work around it:

#!/bin/bash -li

Upvotes: 1

Related Questions