I want to run two c programs in the home directory, but the programs are stored in another directories, where each has own directory. So, I do followings:
I have two scripts for each program in their directories:
Script run_rd.sh with the content:
#!/bin/bash sudo ./recv_csi tst.dat
Script run_sd.sh with the content:
#!/bin/bash sudo ./send_Data wlan4 00:01:02:03:04:05 10
I have another script in the home directory, which calls the scripts from above. The goal is to run both c programs at the same time:
Script run.sh with the content:
#!/bin/bash pathToRecvCSI="/home/ubuntu/A-Tool-APP/recvCSI/" pathToSendData="/home/ubuntu/A-Tool-APP/sendData/" sh $pathToRecvCSI"run_rd.sh" & PIDIOS=$! sh $pathToSendData"run_sd.sh" & PIDMIX=$! wait $PIDIOS wait $PIDMIX
After execution I get the following output:
sudo: ./send_Data: command not found sudo: ./recv_csi: command not found
But, if I will execute run_sd.sh/run_rd.sh separately in their directories, they run as normal.
What is the reason why the run.sh prints that output? Could someone help me?
PS: All scripts has executable permissions.