在Perl中,以下代码将从命令行args或stdin中指定的文件中读取:
while (<>) { print($_); }
这很方便.我只是想知道在bash中从file或stdin读取的最简单方法是什么.
bash stdin
bash ×1
stdin ×1