各位前辈,我刚开始学习 linux 与 Qt ,使用Qt 4
因为想学习 Qt 与 shell script 的应用
所以自行定一个题目
判断java资料夹是否存在,shell script写法如下:
- #!/bin/sh
- #dir_exist.sh
- if [ -d /usr/share/java ];then
- echo "/usr/share/java"
- else
- echo " /usr/share/java does not exist "
- fi
我有想测试看有没有取得shell script字串 写了一个错误语法.............
javaPath=system("./dir_exist.sh");
qDebug(" javaPath => %s , javaPath);
请问各位前辈,我该如何用Qt4去取得shell script的字串值呢?
有很多地方不了解............
请各位前辈指导我谢谢.........