10 2018 档案

Linux系统下打印第n行的方法
摘要:方法一:cat cat filename | head -n 5 | tail -n +5 方法二:sed sed -n '5p' filename 扩展:打印第3~5行 cat filename | head -n 5 | tail -n +3 sed -n '3p;4p;5p' filename 阅读全文

posted @ 2018-10-22 00:40 那年月光 阅读(4517) 评论(0) 推荐(0) 编辑

Linux系统下python代码运行shell命令的方法
摘要:方法一:os.popen 方法二:os.system 其中trans.sh代码: 方法三:subprocess 方法四:commands 阅读全文

posted @ 2018-10-20 22:11 那年月光 阅读(3743) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示