新建一个test文件,每行一个命令,内容如下:
# cat ./testecho "1, hello, world"echo "2, hello, world"echo "3, hello, world"echo "4, hello, world"echo "5, hello, world"
使用cat 输出文件内容,并一行一行执行
# cat test | sh -x+ echo '1, hello, world'1, hello, world+ echo '2, hello, world'2, hello, world+ echo '3, hello, world'3, hello, world+ echo '4, hello, world'4, hello, world+ echo '5, hello, world'5, hello, world
