小编Phi*_*hil的帖子

linux - bash - 读取:非法选项 -n

在 Ubuntu 上,我尝试暂停bash shell 脚本

!#/bin/bash
...
read -n 1 -p"pause"
Run Code Online (Sandbox Code Playgroud)

我到处都看到这种语法,所以我不明白为什么它不起作用

我收到这个错误

./build.sh: 14: read: Illegal option -n
Run Code Online (Sandbox Code Playgroud)

我也不明白的是,在阅读手册中,没有 -n -p 选项

Linux 中有两种不同的读取命令吗?

纯粹的

linux script shell

0
推荐指数
1
解决办法
2739
查看次数

标签 统计

linux ×1

script ×1

shell ×1