Fix shell script couldn't get document input