last day (14 days later) » 

10:06 AM
0
Q: run file from different directory

DchrisLet's say i have the following directories: /mainfolder /mainfolder/execution What i what to do is to run precosat solver from a different directory. Now i want to run configure file from mainfolder directory for files in execution directory.When i execute ./configure from execution directory ...

 
NSD
did you try . /home/etc/user/mainfolder/execution/configure ?
 
@NSD Yes,i have the same result as my final try
@NSD Is there a space between . and /home?
@don_crissti That's right.Configure is not a file or directory,it's the command i want to execute.
@don_crissti You are right.My mistake.
 
NSD
@Dchris , yes there was a space .... this is how you would source a program to run. A way to run files when you dont have permission to run.
@Dchris , could you run file /home/etc/user/mainfolder/execution/configure and if its a script or ascii text do a grep -A5 -B5 "sed" file /home/etc/user/mainfolder/execution/configure and paste the result here ? ..... it might be that the makefile.in which i think sed is supposed to make change/update to might be missing or the path might have been changed. This was we can confirm it.
 
@NSD Updated result in my question
 
NSD
@Dchris , sorry .... forgot to remove the 'file' from the grep
@Dchris ,thank you .. the sed command is substituting some values from/to the makefile.in descriptor file .... the makefile.in seems to be mentioned a bit below in the command than what has been reported back by the grep command ..... you would need to locate that makefile.in and change the path/location so that it is accessible in the /home/etc/user/mainfolder/execution/configure directory then it should work fine
 
10:06 AM
@NSD makefile.in file is located in the same directory as configure file is
 
NSD
i think CONVERTTOCNF is the real directory of your project , to locate the makefile.in or similar named file use .... first go the CONVERTTOCNF and there run find . -iname "*makefile.in*" -typr f this should give you all possible locations within CONVERTTOCNF or its subdirectories where that file could be present. If CONVERTTOCNF isint your main directory then you can run the find command from your main project directory. Hope things work out now
 
i didn't run that yet but i have to mention that there was another makefile.in file(exactly the same) under CONVERTTOCNF directory
i removed that makefile.in and i run again . /home/etc/user/mainfolder/execution/configure but i got the same messages
 
NSD
Hello ....... i dont understand , if the file makefile.in is present in the same location as the config , then why isint it able to read it ? It should work ..... Could you provide the sed command from the file ?
also please put the file back to the original location . I had written that comment as i though that you might have to do a search for the file , the file may be missing. That comment logic is no longer of use now
 

last day (14 days later) »