Guys, thanks for your help. I'm a complete newbie as shell-scripting. I'm using the cygwin shell to control custom c-drivers running in windows for data-acquisition modules...Anyways, so I tried the solution suggested by @elixir_sinari and it worked. I don't understand why it works, i.e. why the single quotes and why I need to use eval. More broadly, though, I'm trying to understand what @alister is suggesting. This var2 variable is actually part of a script file that I'm developing, it contains the path to my c-driver executable. I'm utilizing this path in a lot of places in my code. Since I may change this location later, I wanted to store it in a variable that can easily be modified later. What is the alternative to this?
Now, further along in my scripting, I have another issue and it is as follows:
I have 3 variable declared
if I do
I get
so far, so good.
but if I do:
then I get this:
What the dicken's is going on here? Why is my line being overwritten by config
. At first I thought there was a limit to the number of characters per line in bash, but I did google on and found getconf ARG_MAX which returns 32000, so that isn't the issue.
I've created a c program and compiled it with gcc, in unix.
The file name is abc.c and it is run by typing the command ./abc
I have another program which creates a child process, and I need this abc program to run on that child process. I've tried execvp(), but it doesn't work.
How can I run... (2 Replies)
Hello,
I have an executable cgi program that I can run manually from my Linux shell after setting environmental variables on the previous line, like this:
setenv QUERY_STRING "workdir=/u/here/there/&nb1=5&nb2=1000"
MyExecutable.cgiHow can I imitate this behavior in a bash script?
I tried... (11 Replies)
hi
i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script
example:
file name is test.vbs which contains
strSoundFile = "C:\windows\Media\Notify.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand... (5 Replies)
Dear Sir,
I am using CentOS-5.2(64-bit) as an server side OS in a cluster with 32 slaves+1 Master. My question is, after compiling a file with ifort, I am suppose to get a executable(say a.out). I want my users to do ssh slave.local and then do ./a.out
But is it possible to restrict... (0 Replies)
Hey guys, so I've been trying to write a bash script called runSorter.sh that runs an executable that also takes in some parameters and outputs the results to a text file. The executable, sorter, takes in a number parameter. I want to make it so that you can input as many number parameters into... (4 Replies)
Hey all,
I'm trying to execute a program and despite it appearing to be there, I keep getting this:
-bash: ./aisdispatcher: No such file or directoryTo run it, I'm going into the directory where it is stored and running
./aisdispatcher...the result of which should just be a listing of options... (10 Replies)
I wish to create an executable bash script that will run the following commands as root, that is, using sudo su
iptables-save | awk '/^
/ { print $1 }
/^:+ / { print $1 " ACCEPT" ; }
/COMMIT/ { print $0; }' | iptables-restoreMy first attempt at bash... (9 Replies)
Bash version 4.4.20 / Ubuntu 16.0.4
Hello,
I tried to write a script that gathers some data and passes them to an executable.
The executed application answers with an error. The echo output in the script returns correct values.
If I copy/paste the last echo command, it get's executed... (2 Replies)