is this possible?
its kind of like incrementing the value of a number in a variable. but in this case, instead of the value of the variable being a number, it's just contents/strings/characters/alpha-numeric 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.
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.
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.
Allright so a quick question.
I'm building a script that will eventually do a full IP subnet scan.
It starts off by first entering an IP address, (capturing host and net ID comes after that) and I want it to use the current IP address if no input is given.
Is there a quick way to define the value of the variable I want to read when no value is given?
Now I've already figured out how to extract
I am writing my first udev rule.
Anyone knows how to set variable in TCL ?
let say i have a password variable and it will have different values.
set variable
and variable has different values like:
xxxx
yyyy
zzzz
hi ,
please help me in this context
pkg1_name="/dir1/dir2/dir3/pkg1.txt"
pkg2_name="/dir1/dir2/dir4/pkg2.txt"
.
.
.
input to the script is pkg1 or pkg2 or ...
i have used pkg variable to save input i.e.
pkg=$1
now i need the following
result=`awk something ${pkg}_name ` for each file
but the output is showing error as
pkg1_name : no such file or d
I don't fully understand variables in perl.
If we have a variable defined like this "my $number = 1" then this is called a lexical variable? But if you define this at the top of a script then why isn't it a global variable because it would be available throughout the file?
Sorry if this is a really stupid question to ask but I'm getting myself confused.