LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   command "export" has some problem (https://www.linuxquestions.org/questions/linux-newbie-8/command-export-has-some-problem-4175501212/)

mirage1993 04-10-2014 06:59 AM

command "export" has some problem
 
when I enter
Code:

mirage@myhost:~$ export PETSC_DIR="/usr/local/bin/petsc-3.4.4"
then the bash will output
Code:

bash: export PETSC_DIR=/usr/local/bin/petsc-3.4.4: No such file or directory
I can't understand.

my OS is lubuntu 12.10

rtmistler 04-10-2014 07:52 AM

Yeah there's a problem with export, because it will make the shell variable whether or not it exists.

What happens if you just type "export"? Does it show a bunch of declares?

Does this always happen, or is it only happening on one shell, once?

knudfl 04-10-2014 07:54 AM

"PETSC_DIR" is the petsc/ source directory.

Configuring example : $ ./configure PETSC_DIR=$HOME/petsc
#12 http://www.linuxquestions.org/questi...ies-440794/#12

PETSc info http://www.linuxquestions.org/questions/tags/petsc/

*** Which application is it that require PETSc ? ?

-

mirage1993 04-10-2014 10:04 PM

Quote:

Originally Posted by rtmistler (Post 5150066)
What happens if you just type "export"? Does it show a bunch of declares?

Does this always happen, or is it only happening on one shell, once?

thx,
Yesterday,when I just type "export",it will list many environment variables.
But ,I just type
Code:

PETSC_DIR="/usr/local/bin/petsc-3.4.4"
and then
Code:

echo $PETSC_DIR
finally
Code:

export PETSC_DIR
In this way ,I gain success.But I was confused.
It was not always out of the question.when I type export a=b,it can work well.

Today,I try
Code:

export PETSC_DIR="/usr/local/bin/petsc-3.4.4"
again. and it can work very well..I can't understand.

mirage1993 04-10-2014 10:13 PM

Quote:

Originally Posted by knudfl (Post 5150067)
"PETSC_DIR" is the petsc/ source directory.

Configuring example : $ ./configure PETSC_DIR=$HOME/petsc
#12 http://www.linuxquestions.org/questi...ies-440794/#12

PETSc info http://www.linuxquestions.org/questions/tags/petsc/

*** Which application is it that require PETSc ? ?

-

thx,today,I try
Code:

export PETSC_DIR="/usr/local/bin/petsc-3.4.4"
again.
but it work very well....I can't understand.
it's a application called DAMASK than require PETSc.

berndbausch 04-12-2014 04:23 AM

Quote:

Originally Posted by mirage1993 (Post 5150493)
thx,
Yesterday,when I just type "export",it will list many environment variables.
But ,I just type
Code:

PETSC_DIR="/usr/local/bin/petsc-3.4.4"
and then
Code:

echo $PETSC_DIR
finally
Code:

export PETSC_DIR
In this way ,I gain success.But I was confused.
It was not always out of the question.when I type export a=b,it can work well.

Today,I try
Code:

export PETSC_DIR="/usr/local/bin/petsc-3.4.4"
again. and it can work very well..I can't understand.

It seems that bash thought "export PETSC_DIR=blabla" was a file name. Perhaps what looks like a space between export and PETSC_DIR was in fact a non-printable character.

Smokey_justme 04-12-2014 07:04 AM

Quote:

Originally Posted by berndbausch (Post 5151162)
It seems that bash thought "export PETSC_DIR=blabla" was a file name. Perhaps what looks like a space between export and PETSC_DIR was in fact a non-printable character.

Either this or IFS was modified on that bash session.. and space wasn't part of it anymore..


All times are GMT -5. The time now is 12:25 AM.