Hello,
I have a problem with a bash script, I've been doing recherches but i can't make it work. It is my first time with a dynamic variable and i don't understand how to write it.
I am extracting directory path from file which is stored in a variable.
while read inputline
do
script_name=`echo $inputline | cut -d' ' -f2`
cd $script_name
done < path_scripts.txt
where as path_scripts contains
input_process.bash ~/jobs/process/input/bin
The script output says... (1 Reply)
Hi All,
I have the below scenario:
A file test.cfg with three fields>>
DATA1 DATA2 DATA3
In the script I need to assign each of the fields to variables. The number of fields will not be constant (this case we have three). Im trying to do something like this:
NUM=1
OUT_DAT_NO=3
... (4 Replies)
I found one post in another site with a solution for my problem
the below solution should explain what I want.
#!/bin/sh
first="one"
second="two"
third="three"
myvar="first"
echo ${!myvar}
But this gives error 'bad substitution'
System info
SunOS sundev2 5.9... (3 Replies)
I need some variable help
TEMP1=Jane
TEMP2=Sue
X=1
eval USER=TEMP${X}
echo $USER
This gives output USER1
I would like to get Jane
I have tried
eval USER='TEMP${X}'
eval USER="TEMP${X}"
eval USER=`TEMP${X}` (3 Replies)
Hi guys.
i have a requirment as below.
I have a scripts which perform for loop
for i in /backup/logs -- it will give all the logs file
SC_RIO_RWVM_20120413064217303.LOG
SC_RIO_RWXM_20120413064225493.LOG
SC_RIO_RXXM_20120413064233273.LOG
...
do
open script.sh ---- in this file... (3 Replies)
Hi,
I am trying to call this variable declared globally STATE=`/opt/Mic*/bin/mstrctl -s IntelligenceServer gs | grep "state" | cut -f2 -d'<' | cut -f2 -d'>'` which extracts the status of a microstrategy server inside the loop. But once the value is assigned initially in the begining, it is not... (5 Replies)
Hello
I have found some piece of code to verify and then run shell script with root permission from normal user.
see : http://blog.mecworks.com/articles/2006/02/23/bash-scripting-tip-running-a-script-as-root
I have wrote two scripts using this tips.
- one to copy file from server to local... (6 Replies)
I have a small program which needs to pass variable dynamically to form the name of a second variable whose value wil be passed on to a third variable.
***************** Program Start ******************
LOC1=/loc1
PAT1IN=/loc2
PAT2IN=/loc3
if ; then
for fpattern in `cat... (5 Replies)
Hi everyone,
I'm trying to write a small script to automatize row data treatment. However, I got some trouble with the awk command.
I want to use awk to extract a define paragraph from a text file. The first and final lines are defined externally in two variables called debut and fin.
I... (2 Replies)
Hello,
I'm trying to build a small script to store a command into a dynamic variable, and I have trouble assigning the variable.
#!/bin/bash
declare -a var1array=("value1" "value2" "value3")
var1arraylength=${#var1array}
for (( i=1; i<${var1arraylength}+1; i++ ));
do
mkdir... (7 Replies)
Discussion started by: alex2005
7 Replies
LEARN ABOUT DEBIAN
hobbitclient.cfg
HOBBITCLIENT.CFG(5) File Formats Manual HOBBITCLIENT.CFG(5)NAME
hobbitclient.cfg - Xymon client environment variables
DESCRIPTION
Xymon programs use multiple environment variables beside the normal set of variables. For the Xymon client, the environment definitions
are stored in the ~xymon/client/etc/hobbitclient.cfg file. Each line in this file is of the form NAME=VALUE and defines one environment
variable NAME with the value VALUE.
SETTINGS
BBDISP The IP-address used to contact the Xymon server. Default: Chosen when the Xymon client was compiled.
BBDISPLAYS
List of IP-adresses of Xymon servers. Data will be sent to all of the servers listed here. This setting is only used if
BBDISP=0.0.0.0.
BBPORT The portnumber for used to contact the Xymon server. Default: 1984.
BBHOME The Xymon client top-level directory. Default: The $HOBBITCLIENTHOME setting inherited from the "runclient.sh" script which starts
the Xymon client.
BBCLIENTLOGS
The directory for the Xymon clients' own logfiles. Default: $BBHOME/logs
BBTMP Directory used for temporary files. Default: $BBHOME/tmp/
BB Full path to the bb(1) client program. Default: $BBHOME/bin/bb.
Commands
Many extension scripts expect a series of environment variables to point at various system utilities. These are included in the file
when the client is built.
INHERITED SETTINGS
Some environment variables are inherited from the "runclient.sh" script which launches the Xymon client:
MACHINEDOTS
The hostname of the local system. Default: Taken from "uname -n".
MACHINE
The hostname of the local system, with dots replaced by commas. For compatibility with Big Brother extension scripts.
BBOSTYPE
The operating system of the local system, in lowercase. Default: taken from "uname -s".
HOBBITCLIENTHOME
The top-level directory for the Xymon client. Default: The location of the "runclient.sh" script.
SEE ALSO xymon(7)Xymon Version 4.2.3: 4 Feb 2009 HOBBITCLIENT.CFG(5)