LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-10-2014, 07:59 AM   #1
mirage1993
Member
 
Registered: Feb 2014
Location: China
Distribution: CentOS6.4
Posts: 51

Rep: Reputation: Disabled
Question 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

Last edited by mirage1993; 04-10-2014 at 08:01 AM.
 
Old 04-10-2014, 08:52 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: Sutton, MA. USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu
Posts: 4,106
Blog Entries: 10

Rep: Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524Reputation: 1524
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?
 
1 members found this post helpful.
Old 04-10-2014, 08:54 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
"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 ? ?

-
 
1 members found this post helpful.
Old 04-10-2014, 11:04 PM   #4
mirage1993
Member
 
Registered: Feb 2014
Location: China
Distribution: CentOS6.4
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rtmistler View Post
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.

Last edited by mirage1993; 04-10-2014 at 11:16 PM.
 
Old 04-10-2014, 11:13 PM   #5
mirage1993
Member
 
Registered: Feb 2014
Location: China
Distribution: CentOS6.4
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by knudfl View Post
"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.
 
Old 04-12-2014, 05:23 AM   #6
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,687

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by mirage1993 View Post
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.
 
1 members found this post helpful.
Old 04-12-2014, 08:04 AM   #7
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Quote:
Originally Posted by berndbausch View Post
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..

Last edited by Smokey_justme; 04-12-2014 at 08:06 AM.
 
1 members found this post helpful.
  


Reply

Tags
petsc, shell script


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Any command does not execute after setting "export" to .bashrc file projjwal Linux - Newbie 4 05-15-2013 09:09 AM
How to "export" out put of command "date"? hbchok Linux - Newbie 6 11-03-2012 05:14 AM
.bash_profile, "-bash: export: command not found" Squall90 Slackware 9 05-16-2012 04:45 PM
How to change " setenv IDLUTILS_DIR ~/idl/idlutils" to "export"?? msbstar Linux - Newbie 3 02-05-2011 05:23 AM
How does "export" command work? sitg Linux - Networking 1 03-16-2004 12:38 AM


All times are GMT -5. The time now is 10:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration