can i use the value of one variable to generate a name for another variable?
for example i want to use the counter from a "do while" loop to name and define a variable each time the loop executes. for example
objectnames1=`ls -a`
objectnames2=`ls -a`
etc.
i have a variable that has more than one value. i am declaring another variable, which will have the old variable data one by one. i want to use the second variable to hold the track of all the variable it has parsed from the first one.
Hi,
How to set as variable from sql output.
Query:
Code:
select aa.serial, ao.name from ann_amit aa JOIN ann_object ao on (aa.classid=ao.classid);
I got two values from aa.serial and ao.name, I wanna make two different variable for aa.serial and ao.name.
I am writing my first udev rule.
The only calculator I know is bc. I want to add 1 to a variable, and output to another variable.
I got the nextnum variable from counting string in a file:
nextnum=`grep -o stringtocount file.tpl.php | wc -w`
Lets say the nextnum value is 1. When added with 1, it will become 2.
I have values in the variable as so the for loop just fetches one by one
params=$'$HEW_SRC_DATABASE_LIB\nprmAttunityUser\nprmAttunityPwd\nprmODBCDataSource\nprmLoadInd\nprmS rc_Lib_ATM\nprmODBCDataSource_ATM'
and i have a grep command like this
Code:
ret=`grep \$y $pf`
Where $y refers to values in the params variable and $pf contains certain values w
Hi All,
Any one please help me with the below scenario.
I have a file with the data like below
This is the integer variable name is <abc1>
This is the Float variable name is <abc1>
This is the integer variable name is <abc2>
This is the Float variable name is <abc2>
This is the integer variable name is <abc3>
This is the Float variable name is <abc3>
This is th
in a bash script, How do I get a variable's content, from the contents of another variable, both variable names have the same trailing number?
IP1=192.168.0.17
DIR1=/mnt/2tb/archive/src/
IP2=192.168.0.11
DIR2=~/src/
IP3=192.168.0.113
DIR3=~/src/
#get local ip and set variable HOST to local ip
HOST=$(ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}')
# get HOST
In the code, I have an integer variable. In the GUI, I have a numeric editText field and two buttons which increase/decrease the value of the variable by one.
I need to link the field to the variable so that the field shows the current value of the variable every time it's changed (ie.