Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use #!/usr/bin/env bash and fix doc #291

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Conversation

i18nsite
Copy link
Contributor

@i18nsite i18nsite commented Jul 3, 2024

ubuntu
❯ sh dev_init.sh
dev_init.sh: 4: Bad substitution
dev_init.sh: 12: Syntax error: redirection unexpected

我研究了下,貌似ubuntu默认sh是dash
https://unix.stackexchange.com/questions/442510/how-to-use-bash-for-sh-in-ubuntu

有多个程序实现了 的语言 /bin/sh 。在 Ubuntu 上, /bin/sh 是 dash,它被设计为快速,使用少量内存,并且不支持超过预期的最低限度 /bin/sh 。在 RHEL 上, /bin/sh 是 bash,它速度较慢,使用更多内存,但具有更多功能。其中一个功能是 [ 条件语法的 == 运算符。Dash 支持 [ ,这是一个基本的 sh 功能,但它没有作为 bash(以及 ksh 和 zsh)扩展的 == 运算符。

Since Ubuntu 22.10 and Debian 12, this is no longer supported; if you want to switch /bin/sh to /bin/bash, you’ll have to symlink it manually. See Gilles’ answer for details.
从 Ubuntu 22.10 和 Debian 12 开始,不再支持此功能;如果要切换 /bin/sh 到 /bin/bash ,则必须手动对其进行符号链接。有关详细信息,请参阅 Gilles 的回答。

@i18nsite i18nsite changed the title use bash not sh use #!/usr/bin/env bash and fix doc Jul 3, 2024
@Teingi Teingi self-requested a review July 3, 2024 05:31
Copy link
Contributor

@Teingi Teingi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Teingi
Copy link
Contributor

Teingi commented Jul 3, 2024

good job!

@Teingi Teingi merged commit 8d895d0 into oceanbase:master Jul 3, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants