例えばシェルスクリプトで$_ってどういう意味ですか?
って聞かれても困るだろ?このコードで

cat test.txt | ruby -e 'while gets; print $_; end'