linux上最简单的python脚本

1.内容

python<<pythonoff
print("123")
pythonoff

2.构建过程

2.1 创建文件

touch test.sh

2.2 添加内容

echo "python<<pythonoff" > test.sh
echo "print("123")" >> test.sh
echo "pythonoff" >> test.sh

2.3 设置权限

chmod +x test.sh

2.4 执行

./test.sh

3.效果图

ps:
下载链接

posted @ 2024-12-23 14:07  基础狗  阅读(22)  评论(0)    收藏  举报