简体   繁体   中英

Error "syntax error near unexpected token '&' - trying to run a file from command line within an application

I am a newbie to Linux and I am only really using it to use a program for my final year thesis. I have got to grips with the language for the program but am having issues with actually running it in Linux. The program is called "CACTUS" and all documentation can be found here .

I have extracted the application file and I have made the executable as instructed in the install.txt file:

"Installation of CACTUS for Linux or Mac machines.

  1. Unzip the directory and put in desired location. On terminal cd into the correct directory (you should be able to see the makefiles).

  2. Create the executable by typing:

    $make

    or

    $make -f Makefile.gfortran

    on the terminal. The executable will be called cactus and be located in the directory one level above.You can add the executable's location to your path so that you can call it by simple typing cactus on the terminal instead of the complete path.

  3. cd into the Test/RegTest directory

    $cd ./Test/RegTest

    and run the RegTest by executing runreg.py with the path to the CACTUS executable as an argument (or just the name of the executable if you added it to your path).

    $./runreg.py ../../../cactus

    or

    $./runreg.py cactus

    The output should say 'No differences' for all three tests. Note: if you have Python 3 installed used runreg_p3.py instead.

    CONGRATULATIONS! You have successfully installed CACTUS.

I have run this and I didn't get the "No Differences" returned on the runreg.py. I continued anyway as I did not know why or how I could fix this. (This may be a root cause of my overally problem here)

As I progressed I have been trying to open an input file "TestVAWT.in" from TestCase2 with the following command:

./TestVAWT.in ../../../cactus

From this I get the error in the title returned. Am I correct in assuming that it has tried to run the TestVAWT.in file on the command line without referring to the Cactus application which I presume would be able to read the '&' prefix of the code along with the rest of the input file. Or is it something else I am missing here.

I would appreciate any help as I have been banging my head against a wall for some time now.

Note: I am using Ubuntu 14.04 LTS .

Best Regards

Richard

Don't know the application, but looks kind of strange to me. Please try adding the Input-File as a parameter:

cactus TestVAWT.in

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM