ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, I have an app that reads the data from some archives. I want this app to work for all the system, wherever the call is done. For that reason I have put this app in the path, but how can I make it to read from the place that is the data?
In other words, MyApp needs Mydata, but cannot find( I have to "tell" somehow to the app that the data is somewhere or export the data somehow.
even if you 'export' a variable,it's not available in the current shell.
maybe that's what you're running into. Try '. ./DATA'
For instance, if I want to write a script that sets up a bunch of environmental variables in the current prompt before I login, I'd have to run '. /path/to/script'. Notice the preceding '.' followed by a space.
For example , I frequently have to change the CVSROOT enviroment variable before I run the cvs command. The problem is I have multiple CVS trees tracking and a different CVSROOT for each. the '-p' option of cvs can be used, but that's a long command. So I write a script for each source tree eg...
-----
#!/bin/sh
export CVSROOT=".....
------
Then run the script '. ./cvsroot1.sh'
The '. ' specifies that the script runs in the current shell. So you can log yourself out by calling the 'exit' program in one of those scripts for example
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.