mac环境下
新建编译文件shell.sublime-build, 编译系统选择自动即可
{ "cmd": ["bash", "$file"], "selector": "source.shell" }
hello.sh
#!/bin/bash echo "hello world" echo "你好,世界!"
运行:command + B
输出:
hello world 你好,世界! [Finished in 0.0s]
新建编译文件shell.sublime-build, 编译系统选择自动即可
{ "cmd": ["bash", "$file"], "selector": "source.shell" }
hello.sh
#!/bin/bash echo "hello world" echo "你好,世界!"
运行:command + B
输出:
hello world 你好,世界! [Finished in 0.0s]