I am using Redhat Linux 2.6.32-220.4.1.el6.x86_64 and is logged in as root
The final idea is to login as root and su to some other id and run installation scripts. Those installation script need to access some variables and hence trying to set those.
As I mentioned, its not only failing in setting variables but also thing like below are also not working
Can you please advise any other technique to accomplish this?
Last edited by methyl; 08-23-2012 at 06:34 PM..
Reason: correct spelling and typos for readability ... and code tags
I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so:
set -a
export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data"
export... (2 Replies)
I am exporting data using a shell program. I am getting all of the records instead of getting a subset based on my query. The export_problem.par lists all of my tables. I tried the query with the ' and without it. How do I get the export to use the query?
Thanks!
... (1 Reply)
I am trying to export command at shell in AIX5.3.
example: environment variable SAMPLE=test is set. after logged in to the shell, i tried to export this variavle to $ export SAMPLE=test1.
If i do $ echo $SAMPLE, it is still giving test instead of test1. what shall i do?? (1 Reply)
Hi Friends,
I am presently migrating shell scripts writter in KSH to SH.I am stuck at this place and i am not able to find a work around:-
Let the script name is x.sh
Below are some of the codes in it...
export abc=hello
export abc=hi
export abc=how
When i am trying to compile the script ... (6 Replies)
we have a Solaris 8 nfs server that exported two shares. entries are in /etc/dfs/dfstab.
clients have been accessing these shares for several years.
we just rebooted this nfs server and noticed that no share gets exported. I don't see relevant messages from dmsg nor messages file, is there... (6 Replies)
Hi
I have a pass a variable from one script to another.
Here are my scripts
Script #1 ./profile
#!/bin/sh
export NAME="Hello"
Script #2 ./test
#!/bin/sh
./profile
echo $NAME
when I run ./test .. i am not getting anything .. why is that? (5 Replies)
Hi, Unix Gurus,
I have a problem need help. I have a script to generate environment variable code same as following:
oracle_sid=abcd
export oracle_sid
when I execute this code with command ./script_nane it succeeded.
when I try to find it with env command or echo $oracle_sid, it does not show... (5 Replies)
Hi
I want export input data ...
echo "month: "
read m
export m=$m
also export m is not working ?
the month-variable should be exportet for the use in other scripts,
but it is not working like this. What i'm doing wrong?
Thanks in advance!
IMPe (10 Replies)
I am relatively new to exporting variables, and I just can't seem to make this count work. What I have is the following:
TOTAL=$($IMAGELIST -backupid $IM -U |gawk '{print $5}' |tail -1)|gawk '{print $6}'
RESTORED=$($BPDBJOBS -most_columns -jobid $JOBS |cut -f15 -d,) |gawk '{print $6}'
export... (7 Replies)
PMDALMSENSORS(1) General Commands Manual PMDALMSENSORS(1)NAME
pmdalmsensors - Linux hardware monitoring performance metrics domain agent (PMDA)
SYNOPSIS
$PCP_PMDAS_DIR/lmsensors/pmdalmsensors [-d domain] [-l logfile] [-U username]
DESCRIPTION
pmdalmsensors is a Performance Metrics Domain Agent (PMDA) which extracts performance metrics describing the state of hardware using the
lm-sensors on compatible motherboards.
The lmsensors PMDA exports metrics that measure fan speeds, core temperatures and voltage levels.
A brief description of the pmdalmsensors command line options follows:
-d It is absolutely crucial that the performance metrics domain number specified here is unique and consistent. That is, domain should
be different for every PMDA on the one host, and the same domain number should be used for the same PMDA on all hosts.
-l Location of the log file. By default, a log file named lmsensors.log is written in the current directory of pmcd(1) when pmdalmsen-
sors is started, i.e. $PCP_LOG_DIR/pmcd . If the log file cannot be created or is not writable, output is written to the standard
error instead.
-U User account under which to run the agent. The default is the unprivileged "pcp" account in current versions of PCP, but in older
versions the superuser account ("root") was used by default.
INSTALLATION
If you want access to the names, help text and values for the lmsensors performance metrics, do the following as root:
# cd $PCP_PMDAS_DIR/lmsensors
# ./Install
If you want to undo the installation, do the following as root:
# cd $PCP_PMDAS_DIR/lmsensors
# ./Remove
pmdalmsensors is launched by pmcd(1) and should never be executed directly. The Install and Remove scripts notify pmcd(1) when the agent
is installed or removed.
FILES
$PCP_PMCDCONF_PATH
command line options used to launch pmdalmsensors
$PCP_PMDAS_DIR/lmsensors/help
default help text file for the lmsensors metrics
$PCP_PMDAS_DIR/lmsensors/Install
installation script for the pmdalmsensors agent
$PCP_PMDAS_DIR/lmsensors/Remove
undo installation script for the pmdalmsensors agent
$PCP_LOG_DIR/pmcd/lmsensors.log
default log file for error messages and other information from pmdalmsensors
PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the
file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura-
tion file, as described in pcp.conf(5).
SEE ALSO PCPIntro(1), pmcd(1), pcp.conf(5) and pcp.env(5).
Performance Co-Pilot PCP PMDALMSENSORS(1)