Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 need help setting this variable up. Was wondering if this is correct syntax


Is that possible to run from root? I need it to be done in root in order to access certain files, I can also add the rest of the command I am trying to run if you'd like to see the context it's being used inn.

New problem, don't know why but shouldn't this output the file with extension .arpa ? i dont seem to get that file and I require it to run the next command to finish compiling this program.

~/irstlm/bin/  < ~/corpus/ > export IRSTLM=$HOME/irstlm; ~/irstlm/bin/ -i  -t ./tmp  -p -s improved-kneser-ney -o 

Here is the full command:

/home/user/irstlm/bin/  < /home/user/corpus/ > export IRSTLM=$HOME/irstlm; /home/user/irstlm/bin/ -i  -t ./tmp  -p  -s improved-kneser-ney -o 
share|improve this question
Please do provide more context! rootie tootie toot :) – izx Jun 26 '12 at 15:26
I updated the post with the full command – Ferdinand Jun 26 '12 at 15:34

If it's a one-off command, you're better of just setting it for that command, i.e.:

IRSTLM=/home/user/irstlm /home/user/irstlm/bin/  \
  < /home/user/corpus/ >

If it is part of a script use:

export IRSTLM=/home/user/irstlm
/home/user/irstlm/bin/ < /home/user/corpus/ >
share|improve this answer
And if it needs to be persistent across shell sessions, use the .bashrc or whatever other dotfiles are relevant. – belacqua Jun 26 '12 at 15:52
up vote 0 down vote accepted

I figured it out, thanks for the suggestions, they definitely helped, here the final command I ran, it seems I wasn't correctly setting the variable as "irstlm=/root/irstlm" final command:

 /root/irstlm/bin/ < /home/user/corpus/> IRSTLM=$HOME/irstlm; /root/irstlm/bin/ -i -t ./tmp -p -s improved-kneser-ney -o 
share|improve this answer

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.