How do I get a bash script working on FreeBSD, OpenBSD and Linux without modifying it?

前端 未结 1 810
独厮守ぢ
独厮守ぢ 2021-02-15 02:31

Sorry, the headline might be a bit irritating, but I didn\'t know anything better. Anyway, I want a bash script to work on FreeBSD, OpenBSD and Linux without modifying it, but b

相关标签:
1条回答
  • 2021-02-15 02:51

    Using env in the shebang (#!/usr/bin/env bash) should make the script OS agnostic.

    0 讨论(0)
提交回复
热议问题