Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This is for Red Hat Enterprise Linux running bash 3.2.25(1).
I created a .sh file to collect thread statistics for the application that the server was built for. The shell file is supposed to read the value of one key environment variable, $HCIROOT, at the beginning; it isn't, so the value of all derived vars are missing what should be there. The remainder of the shell script runs as it should, but without accomplishing anything.
The script file references the environment var using $<varname>, which I saw in another job file that runs fine every night. Is there another method that I should be using?
The HCIROOT environment var is set when the server is booted (once per year), so what do I need to do get the shell script to use it?
That would be in a different process env to cron job.
If you want it avail to other processes, it needs to be set eg in /etc/profile, or maybe even in a file.
Each process runs in its own env in *nix; there's no 'global' env as such, although you can 'export' vars down a process tree.
See various references to 'export' here http://linux.die.net/man/1/bash
was a mass quantity of "Permission denied" and "No such device or address" restrictions on every file that grep tried to search.
The result of
grep -r HCIROOT ~/.[A-z]*
was a list of references to HCIROOT in the .bash_history file. The birth of this variable is quite the mystery.
Reading theNbomr's statement about the common idiom in Linux gave me the idea to source the .profile from within my getstats2.sh script, instead of sourcing it in the crontab file. Both files are in /home/hci, at least for now. I also decided to manually create the HCIROOT var since, on this engine product, the var is always set to
and the CL_INSTALL_DIR var is set in /home/hci/.profile.
Let me know what you think. And thanks for all your suggestions.