Question: Use of export command
gravatar for caro-ca
7 months ago by
caro-ca0 wrote:

Hi, community! After reading a lot, I am still not very familiar with the export command. I need to install Busco, and I am stuck in this section:

define a custom path (including the filename) to the config.ini file by setting the following environment variable, which will override the default location:
export BUSCO_CONFIG_FILE="/path/to/filename.ini"
This is useful for switching between configurations or in a multi-users environment. In addition to Python, you will need to make sure that the following required software packages (NCBI + HMMER + AUGUSTUS) are installed with their paths declared in the config.ini file.

Sorry to ask this question here, but the Github repository for Busco doesn't reply to me.
I hope you can help me out.

linux busco • 221 views
ADD COMMENTlink modified 7 months ago by lakhujanivijay5.0k • written 7 months ago by caro-ca0
gravatar for lakhujanivijay
7 months ago by
lakhujanivijay5.0k wrote:

Hi caro-ca

export is built-in generic linux command whose details could be found here

In this case export command will update the current shell session with the exported variable; i.e. BUSCO_CONFIG_FILE. So, you have to provide the path of the .ini file to BUSCO_CONFIG_FILE variable using export. And then to check if the path has been set correctly, you can do


and that should echo the path to the .ini file. I hope this helps.

ADD COMMENTlink written 7 months ago by lakhujanivijay5.0k

Thank you for your help! I will try that out!

ADD REPLYlink written 7 months ago by caro-ca0

I notice that when I open another terminal, the echo $BUSCO_CONFIG_FILE doesn't tell me the paths. Do I have to use source ~/.bash_profile ?

ADD REPLYlink written 7 months ago by caro-ca0

exporting has the more specific function of making the exported item (be it a variable or a function) available not only to your shell session, but also any child shells it spawns.

Environment variables (such as your $BUSCO_CONFIG_FILE) persist only within that shell session. When you open a new terminal, it doesn’t know that variable ever existed.

If you need that variable to persist indefinitely, you need to add the command export $MY_VARIABLE to one of the ‘start up’ files. These vary slightly by your OS, but are generally called ‘dotfiles’. These include .profile, .bashrc (if bash is your shell), .bash_profile.

Run the command:

echo 'export BUSCO_CONFIG_FILE="/path/to/"' >> ~/.bash_profile

To add it permanently.

ADD REPLYlink modified 7 months ago • written 7 months ago by Joe16k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1648 users visited in the last hour