run optistruct via bash file
Hello,
im trying to do an optimisation on optistruct on Linux
i generatred my fem File with hypermesh on linux,
i did some changes on the fem File via Matlab on linux
i create a new fem File as output and run the first Iteration manually, the generated, sh file will be placed where the second iteration should be executed
now my goal is to send a command from matlab to optistruct to run the 2 nd 3rd, n th iteration, the command in matlab look like this
system([Argument_1,Argument_2 ,Argument_3]); where Arg_1 is the Bash file, Arg_2 the fem File, and Arg_3 is the sh file.
my goal is to generate the ouput of the optimization automatically
the problem here im new in linux and i dont know what to write as a bash file to run this command.
can you please help me in this topic ??
thx in advance
If I understand you correctly:
Try within 'run.sh' :
#!/bin/bash MyDir=/home/foo/bar cd $MyDir ./MyScript.sh MyFem.fem MyAnotherScript.sh
Where: 'MyDir' is the folder containing the script 'MyScript.sh'
Do the following command:
chmod +x run.sh
And the script 'run.sh' becomes executable now.