# 将脚本你内容写入文件cat >/tmp/hello-word.sh <<EOF#!/bin/bashecho 'hello word'EOF # 添加执行权限chmod +x /tmp/hello-word.sh# 运行/tmp/hello-word.sh