Capture input from subshell