[Thread Prev][Thread Next][Index]

[ferret_users] Re: Ferret_paths problems




This has answered my ferret_paths problems, thankx Ryo

| I have tried to install Ferret on Linux box. After some steps, I
| have problem in
| customising the ferret_paths.I could not use the setenv but I
| changed using export command
| instaide however, I did get the following error message when I run
| using "source  ferret_paths".  I have also attached the ferret_paths
| that I used in the process.
|
| bash: [: too many arguments

I think this error is due to this line

  if [ $PATH != *ferret* ]

I can guess its intention, but I don't think it will work.
What you want is

  case "$PATH" in
  *ferret*)
     echo appending ferret path
     export PATH="$PATH:$FER_DIR/bin";;
  *)
     echo replacing ferret path
     export PATH=` . . . blah blah . . .`;;
  esac

Please note that I've written this off the top of my head
and I haven't tested this code.

| replacing ferret path
| awk: cmd. line:1: {for (i=1; i<=NF; i++) {if ($i \!~ /ferret\/bin/) {printf
| "%s: ",$i}}}
| awk: cmd. line:1:                                ^ backslash not last
| character on line

The backslash should be deleted, I think.

| bash: uname: command not found
|
I guess this is because you've corrupted the PATH variable.

| bash: [: =: unary operator expected
| bash: uname: command not found
| bash: [: =: unary operator expected
| bash: alias: Faddpath: not found
| bash: alias: `if \!$ !': invalid alias name

Hmm,  I'm not sure, but this alias seems to me to have been copied
from a csh or tcsh script.  First of all, its grammar is wrong.
Also, I don't know bash has this type of extended alias syntax.
In sh, ksh, or bash, you normally use functions rather than aliases if
you want to do anything more complicated than simple string
substitution, which an alias basically is.

Hope this helps,
Ryo


On 3/14/07, Addisu Hunegnaw <ahunegnaw@xxxxxxxxx> wrote:
Dear Sir,

I have tried to install Ferret on Linux box. After some steps, I have problem in
customising the ferret_paths.I could not use the setenv but I changed using export command
instaide however, I did get the following error message when I run using "source  ferret_paths".  I have also attached the ferret_paths that I used in the process.


bash: [: too many arguments
replacing ferret path
awk: cmd. line:1: {for (i=1; i<=NF; i++) {if ($i \!~ /ferret\/bin/) {printf "%s: ",$i}}}
awk: cmd. line:1:                                ^ backslash not last character on line
bash: uname: command not found
bash: [: =: unary operator expected
bash: uname: command not found
bash: [: =: unary operator expected
bash: alias: Faddpath: not found
bash: alias: `if \!$ !': invalid alias name

Kind regards
Addisu



[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement