🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

run optistruct via bash file

MO987654User: "MO987654"
New Altair Community Member
Updated by MO987654

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 

 

Find more posts tagged with

Sort by:
1 - 1 of 11
    QuyNguyenDaiUser: "QuyNguyenDai"
    Altair Community Member
    Updated by QuyNguyenDai

    If I understand you correctly:

    • Arg_1 = your Bash shell script
    • Arg_2=  FEM file, 1st input arg of your Bash shell script Arg_1
    • Arg_3= 2nd input arg of your Bash script Arg_1

    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.