Hi!
I have several bash scripts from projects I worked on using Linux that I would like to use.
Some of these projects use external packages containing bash scripts too.
The problem is that most of scripts start with
#!/bin/bash
and bash in freebsd is located at
#!/usr/local/bin/bash
I could just simply create a symbolic link on /bin/bash > /usr/local/bin/bash
Is this recommended? If not, why?
Or instead I should start using
#!/usr/bin/env bash
and it will be compatible to both?
The problem of this last one is that in downloaded scripts from git projects etc nobody uses it that way, so I will always have to adapt.
Thank you.
I have several bash scripts from projects I worked on using Linux that I would like to use.
Some of these projects use external packages containing bash scripts too.
The problem is that most of scripts start with
#!/bin/bash
and bash in freebsd is located at
#!/usr/local/bin/bash
I could just simply create a symbolic link on /bin/bash > /usr/local/bin/bash
Is this recommended? If not, why?
Or instead I should start using
#!/usr/bin/env bash
and it will be compatible to both?
The problem of this last one is that in downloaded scripts from git projects etc nobody uses it that way, so I will always have to adapt.
Thank you.