Hi, I am a complete n00b in need of help executing her bash shell script.
I am working on my final year project in University. I am a Bio student and so no close to nothing when it comes to Linux.
I am running a simulation on a program called Amber 8 which runs on Linux. I have to run a series of fifteen shell scripts for a step (minimization) in my project and I am ages ages behind. I managed to run my very first file a couple of weeks ago and it looks like this: Code:
#!/bin/bash response. My script, h2.sh looks like this: Code:
#!/bin/bash a) what am I missing, doing wrong in my second script that I should be aware of and be careful of when I do the rest of my fifteen subsequent steps? b) is the problem also in the fact that i am using "./h1.sh" as an invocation? Because i have a feeling that I may have forgotten how to run a shell script altogether (it's been two weeks since i last saw how to)? Please please, someone help ASAP. I am very very doomed for my project. I am ready to provide more infos if any are lacking in this very desperate plea of a post. Thanks alot. I am deeply appreciative of all those of you who can help. |
Hi savioufaire,
I never went to University but I think I can help with your problem. Ok, your using "born again shell", so you should be able to execute your shell scripts with the sh command, for example: Code:
sh <filename> Hope that helps, Regards, Greenie |
Hello!
I did as you mentioned and while i got this Code:
sandhya@sbscluster p53 $ sh h2.sh :confused: :( |
Hi,
Well I wondered about your script, because I thought why would you want to create a file called "myprocfile" that contains only the content of this line: Code:
/usr/local/amber8/exe/sander -O -i h2.in -o md2.out -p p53bp2.parmtop -c restrt1 -r restrt2 -ref refc1 -x mdcrd2 -v mdvel2 -e mden2 -inf mdinfo1 Do you think that the echo command in your script should be removed? Perhaps make a backup folder first, called "projectbackup"; Code:
mkdir /usr/local/amber8/exe/projectbackup and then copy all of your files to your projectbackup folder; Code:
cp * /usr/local/amber8/exe/projectbackup Code:
echo "/usr/local/amber8/exe/sander -O -i h2.in -o md2.out -p p53bp2.parmtop -c restrt1 -r restrt2 -ref refc1 -x mdcrd2 -v mdvel2 -e mden2 -inf mdinfo1 " >> myprocfile Code:
/usr/local/amber8/exe/sander -O -i h2.in -o md2.out -p p53bp2.parmtop -c restrt1 -r restrt2 -ref refc1 -x mdcrd2 -v mdvel2 -e mden2 -inf mdinfo1 >> myprocfile Regards, Greenie |
I don't know anything about Amber8, but I'll take a stab at it.
After running the first script, run 'ls -l' on the directory containing the created file. Who is the owner? If Amber8 owns the file, your chmod command won't change the execute permission, and the next script will fail with a 'permission denied' message. Your first script will have to change ownership (chown <username> <filename>) before the chmod command will work. Then the second script may work. |
All times are GMT -5. The time now is 11:48 PM. |