Re: script advice
- From: "Jürgen Exner" <jurgenex@xxxxxxxxxxx>
- Date: Wed, 15 Feb 2006 04:23:20 GMT
nkomli@xxxxxxxxx wrote:
I'm trying to use a script to automate some Terminal command line work
I'm doing. Basically I'm inputting a filename, then running one set
of files with the sander program to generate an rst file used to
start a loop that will run the sander program again five times with
other sets of files. Since I don't have experience making scripts I'd
like to show what I've got so far to see if there are any mistakes. I
don't know if the filenames I'm using would work...
#!/bin/csh
If you want perl to execute your script you may want to to say so:
#!/bin/perl
You are missing
use strict;
use warnings;
set AMBERHOME="/usr/local/AMBER8"[...]
set MDSTARTJOB=2
set MDENDJOB=6
set MDCURRENTJOB=$MDSTARTJOB
set MDINPUT=1
echo -n "enter filename"
$filename=<STDIN>
chop($filename);
echo -n "Starting Script at: "
date
echo ""
And then you got a whole bunch of syntax errors:
Semicolon seems to be missing at t.pl line 1.
Semicolon seems to be missing at t.pl line 2.
Semicolon seems to be missing at t.pl line 3.
Semicolon seems to be missing at t.pl line 4.
Semicolon seems to be missing at t.pl line 6.
syntax error at t.pl line 2, near "set MDSTARTJOB"
Unrecognized file test: -n at t.pl line 7.
I think you have some serious work ahead of you to rewrite this script into
valid Perl.
jue
.
- References:
- script advice
- From: nkomli
- script advice
- Prev by Date: Re: regex to match any url
- Next by Date: FAQ 2.11 Perl Books
- Previous by thread: Re: script advice
- Next by thread: Re: script advice
- Index(es):
Relevant Pages
|