Debian Codegraph @

memo/D1302/D1302.read-timeout-bash4.1.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 # Bash 4.1 では read -t timeout でタイムアウトした時
4 # 読み取り済みの内容が失われてしまう。
5
6 printfscip-shell system . . printf. '%s\n' {0..10000} | {
7 read -r -d "" -t 0.01 line
8 echoscip-shell system . . echo. "$?:[$line]"
9 read -d "" line
10 echoscip-shell system . . echo. "(${line::10}...#${#line})"
11 }