Simple enough problem I think, I just can't seem to get it right.
The below doesn't work as intended, it's just a function defined in a much larger script:
Code:
CheckValues() {
for field in \
Group_ID \
Group_Title \
Rule_ID \
Rule_Severity \
&
In all my Googling, this usually happens when someone is comparing a variable, and that variable is unset.
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
I am working to update one of my scripts:
Recursive Prepending Script
I was using a fixed file extension and that was pretty easy to deal with in terms of accounting for variable cases (by using [Ff] &c within the loop).
However, I'm trying to allow the user to select the file extension.
Hello Community,
I'm quite confused about my current scripting issue...
I source a file wich contains some variables, like "ks_name=Awesome".
Then i echo some of the content, to verify its not empty, works...
But when i add multiple varibales together, the resulting variable is empty, eventhough i had added hardcoded text?!?
Here's the output:
Code:
# | Fedora : Script
I am trying to connect to SQL plus through unix but i am getting below error
Code:
'ksh: sqlplus: not found'
note i am running this from /home/xxx
do i need to set any environmental variable for this.
Hi
As bash does not support multidimensional arrays (?), I need some help with a problem.
Dear experts,
I am writing a bash script. At some point of the program I need to have 'for' loop. For simplicity I tried with some other simple code.
Hello,
Why is this not working in a script?
Code:
files="test.fsa"
echo $files
for file in $files
do
if [ !