Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
bash进程替代中的提示用户_Bash - Fatal编程技术网

bash进程替代中的提示用户

bash进程替代中的提示用户,bash,Bash,我有一个bash脚本,它使用(一个简单的示例: #!/usr/bin/env bash while read -u 3 -r line; do echo "$line" # something read -p "Continue?" -r response [[ $response == 'y' ]] || break done 3< <(unbuffer my_long_running_script) !/usr/bin/env bash 当读取-u 3-r线时;执

我有一个bash脚本,它使用(
一个简单的示例:

#!/usr/bin/env bash

while read -u 3 -r line; do
  echo "$line" # something
  read -p "Continue?" -r response
  [[ $response == 'y' ]] || break
done 3< <(unbuffer my_long_running_script)
!/usr/bin/env bash
当读取-u 3-r线时;执行以下操作
回音“$line”什么的
读取-p“继续?”-r响应
[$response=='y']| |中断
完成3<
while read -r LINE
do
  something
  ASK_THE_USER
done < <( unbuffer my_long_running_script)
#!/usr/bin/env bash

while read -u 3 -r line; do
  echo "$line" # something
  read -p "Continue?" -r response
  [[ $response == 'y' ]] || break
done 3< <(unbuffer my_long_running_script)