HEX
Server: Apache
System: Linux iad1-shared-b8-33 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User: samfetchero1 (10301780)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //bin/timed-read
#!/bin/sh
# -*- tcl -*-
# The next line is executed by /bin/sh, but not tcl \
exec tclsh8.6 "$0" ${1+"$@"}

package require Expect

# read a complete line from stdin
# aborting after the number of seconds (given as an argument)
# - Don Libes
set timeout $argv
expect -re \n {send_user $expect_out(buffer)}