What is the preferred Bash shebang

0 votes

Is there any Bash shebang objectively better than the others for most uses?

  • #!/usr/bin/env bash
  • #!/bin/bash
  • #!/bin/sh
  • #!/bin/sh -
  • etc

I vaguely recall a long time ago hearing that adding a dash to the end prevents someone passing a command to your script, but can’t find any details on that.

Jun 21 in Linux Administration by Korak
• 5,820 points
8 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Linux Administration

0 votes
1 answer

What is the meaning of 'errno'?

you can retrieve a complete list of ...READ MORE

answered May 20, 2019 in Linux Administration by Shubham
• 13,490 points
257 views
0 votes
1 answer

What is the difference between ctrl z and ctrl c in command line?

Hi@akhtar, Generally, these two commands are used to ...READ MORE

answered Feb 24, 2020 in Linux Administration by MD
• 95,360 points
20,610 views
0 votes
1 answer

What is the linux command to find Memory and CPU usage in percent for last 30 days?

Try the following: Cat proc/meminfo top top -i less /proc/memin ...READ MORE

answered Oct 14, 2020 in Linux Administration by Kim
561 views
0 votes
0 answers

What is the equivalent to getch() & getche() in Linux?

I am not able to find the ...READ MORE

Apr 13 in Linux Administration by Rahul
• 8,980 points
21 views
0 votes
0 answers

What is the difference between a symbolic link and a hard link?

Recently I was asked this during a ...READ MORE

Apr 13 in Linux Administration by Rahul
• 8,980 points
16 views
0 votes
0 answers

What exactly does the Unix `bash` command do when run without options?

When you type bash into the terminal ...READ MORE

Apr 14 in Linux Administration by Soham
• 8,730 points
21 views
0 votes
0 answers

What is the difference between ''find .'' and ''find /'' on linux command

I am solving overthewire bandit. I looked ...READ MORE

Apr 20 in Linux Administration by Edureka
• 13,640 points
27 views
0 votes
1 answer

Is there a limit on the number of words in bash command 'for file in words'?

Anyway, you need to print everything except ...READ MORE

answered May 27 in Linux Administration by Korak
• 5,820 points
16 views
0 votes
0 answers
0 votes
1 answer

What is absolute path in Ubuntu?

An absolute path is a path to ...READ MORE

answered Feb 9, 2019 in Linux Administration by Omkar
• 69,210 points
551 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP