这个简单的脚本应该读一个字母:
#!/bin/bash read -n 1 key echo $key
但它给出了以下错误
read: Illegal option -n
手工执行的read -n 1 key作品虽然。
read -n 1 key
bash
bash ×1