0

I want to run the commands contained in setup.csh concurrently using QProcess.

The deneme variable is a command in the setup.csh file:

alias deneme "ls -la"

My purpose is to run a command guide in that setup.csh.

QProcess *process1=new QProcess(this);
process1->setWorkingDirectory("/home/intern2/elif/SETUP");
process1->start("tcsh",QStringList() <<"-c"<<"\"\"source /home/intern2/elif/SETUP/setup.csh\"\"" << "deneme" );

process->waitForBytesWritten();
process1->waitForFinished();
ui.textedit->append(process.readAllStandartOutput());

"deneme" command not working

Terminal output:

enter image description here

Gui code and output

enter image description here enter image description here

jwpfox
  • 5,124
  • 11
  • 45
  • 42
elif mutlu
  • 83
  • 5
  • 1
    What have you tried? What problems do you have? Do you have a [Minimal, Complete, and Verifiable Example](http://stackoverflow.com/help/mcve) to show us? And what do you mean by running "the commands contained in it concurrently"? – Some programmer dude Nov 09 '16 at 14:34
  • Are you coding in C or C++? Choose one; don't choose both. – Jonathan Leffler Nov 09 '16 at 14:44
  • Maybe your script is missing the "shebang" line? Does the script run when you invoke it from a non-csh shell, e.g. bash? – Kevin Krammer Nov 09 '16 at 18:44
  • I want to write using "c ++" @JonathanLeffler – elif mutlu Nov 10 '16 at 08:22
  • I edited question and added code, Run commands in the "setup.csh" file. The "deneme" variable is a command in the setup.csh file. In the setup.csh "deneme" command: alias deneme "ls -la". First "setup.csh" file as source. Then I want to run the "deneme" command. @Someprogrammerdude – elif mutlu Nov 10 '16 at 08:25
  • What is "shebang" @KevinKrammer – elif mutlu Nov 10 '16 at 08:26
  • @elifmutlu ah, that's a name sometimes used for the `#/bin/shellname' line at the beginning of a script, i.e. the info that tells the current shell or process which shell interpreter to run the script with. Usually the very first line – Kevin Krammer Nov 10 '16 at 21:22

0 Answers0