如何运行C ++程序bash脚本 [英] How to run a bash script from C++ program

查看:118
本文介绍了如何运行C ++程序bash脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

的bash脚本都非常有用,可以节省大量的编程时间。那么,你如何开始C ++程序bash脚本?此外,如果你知道如何使用户成为超级用户,这将是很好也。谢谢!

Bash scripts are very useful and can save a lot of programming time. So how do you start a bash script in a C++ program? Also if you know how to make user become the super-user that would be nice also. Thanks!

推荐答案

使用系统功能。

system("myfile.sh"); // myfile.sh should be chmod +x

这篇关于如何运行C ++程序bash脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆