用分号作为分隔符 function test() { echo "mkdir /opt/a; ls -l; pwd; ls -l" } 转载于:https://www.cnblogs.com/ftrako/p/7760368.html