Re: error using getenv -- bash system

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon Jul 15 2013 - 11:23:30 MDT

AF,

Yagnesh kindly provided you with some tips to clean up your bash program, but
this is not an appropriate email list for continuous help on bash programming.

Also, the error ": comand not found" doesn't provide us with any information
in order to help you, because we don't know what your new script
looks like.

If you are trying to pass in arguments to an NCL script, you might
want to consider using NCL's command line arguments rather
than environment variables. See the examples on this page:

http://www.ncl.ucar.edu/Applications/system.shtml

--Mary

On Jul 14, 2013, at 3:19 PM, Ahmad Farsyud wrote:

> Thank you Yagnes,
>
> I tried, your codes just for test,, and also get the same errors
>
> sh run.sh
> : command not found
> : command not found
> Copyright (C) 1995-2012 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.1.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> "atal: can't find file "comp_zon.ncl
>
> Thank you,
> AF
>
>
>
>
>
>
>
> On Mon, Jul 15, 2013 at 5:43 AM, <yagnesh@lowtem.hokudai.ac.jp> wrote:
>
> Hello Ahmad,
>
> On Jul 15 2013, Ahmad Farsyud <a.farsyud@gmail.com> wrote:
>
> > Hallo,
> > I want to run my code using shell bash,
> > some parameters in the run.sh file are provided as follows:
> >
> > run.sh
> > --------
> > #!/bin/bash/
>
> There shouldn't be trailing forward slash. That may be "#!/bin/bash" or even
> better "#!/bin/env bash". (Though this doesn't matter in your case since you
> executed script by calling "sh" explicitly like "sh run.sh")
>
> > export=mon $2
> > export=monstart $2
> > export=day $3
> > export=daystart $3
> > export=avgper 7
> > export=year $1
> > export=yearstart $1
>
> They are wrong. The syntax for "export" is
> export varname=value
>
> with attached modified versions of your script, my shell log is
> --8<---------------cut here---------------start------------->8---
> $ ./run.sh
> Copyright (C) 1995-2013 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 6.1.2
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> (0) year: 1
> (0) mon: 2
> (0) day: 3
> (0) avgper: 7
> (0) monstart: 2
> (0) day: 3
> (0) daystart: 3
> $
> --8<---------------cut here---------------end--------------->8---
>
>
>
> PS: I am not sure why you placed dollar signs in the export statement. do you
> want give command line arguments to your shell script?
>
> Thanks.,
> --
> ఎందరో మహానుభావులు అందరికి వందనములు.
> YYR
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jul 15 11:23:39 2013

This archive was generated by hypermail 2.1.8 : Tue Jul 16 2013 - 13:21:17 MDT