Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 3 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
@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

Your Answer


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.