Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using a .sh script and it requires the $ARCH variable. When I type

echo $ARCH

nothing shows up on screen. How can I make this variable work ?

share|improve this question
    
What is that variable supposed to contain? It's not something that is common. –  Mat Sep 8 '12 at 11:41
    
I guess the result of command arch, that is in my case i686. It is for installing a fortran90 program called f90split. The line in the .sh involving $ARCH goes like this : mv a.out ~/bin/$ARCH/f90split –  vanna Sep 8 '12 at 12:05
add comment

1 Answer

up vote 1 down vote accepted

In sh, bash or zsh:

export ARCH=i686

In csh or tcsh:

setenv ARCH i686

In Windows cmd.exe:

set ARCH=i686
share|improve this answer
    
Thanks a lot I just added export ARCH=i686 in my .bashrc and it is working perfectly ! –  vanna Sep 8 '12 at 12:35
1  
@vanna: Perhaps use export ARCH=$(arch) or export ARCH=$(uname -m) instead, if you intend to have this in .bashrc or similar. –  grawity Sep 8 '12 at 12:39
    
I actually was to ask you that. Thanks ;) –  vanna Sep 8 '12 at 12:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.