I can't see the red color.
I guess they are probably, "${BOOT}", "${tpsip_arr[$i]}", "${port_arr[$j]}
I am not sure but I too faced that {} doesn't work in these case.
use $BOOT instead ${BOOT} and so on.. should work.
since array variable must be enclosed with in {} to get their value, you probably need to use another variables for them that can be used without {}.
again I am not very sure about it. but please try this.
I need to interpolate a shell variable in a code, i cannot share the exact code so this is an example i made up to describe the situation
What I am trying to do here is try to wrap up the value of a variable in single quotes. This value needs to be passed to another program which would only... (4 Replies)
Trying to do something like this
ls -lrt | awk '$9=="test5"'
-rw-r--r-- 1 lrmq db2iadm1 381 Sep 20 21:56 test5
But now, I need to give a variable in place of test5. For example let's define x as test5
x=test5
ls -lrt | awk '$9=="$x"'
This doesn't seem to be working. It doesn't take the... (4 Replies)
Hi
can anyone help with my issue here. I new in linux and new in scripting. i was ask to do the following below and i`m getting errors. I managed to create the table and the database. Now i need to add the details in a shell to update the database.... (7 Replies)
Hi
i`m trying this script to run and i get the following error.
Enter your name
tman
Enter your surname
smith
-bash: ./500: line 20: unexpected EOF while looking for matching `"'
-bash: ./500: line 21: syntax error: unexpected end of file
... (2 Replies)
Hello. I am writing a simple script that reads a text file and removes records from a mysql database. The items in the text file are of the format:
firstname.middle.lastXXX, where XXX is a 3 digit number. The table has an email field that will match the firstname.middle.last. So, I thought I... (1 Reply)
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
I heard this was possible but from my research I haven't been able to figure it out yet. Seems it should be simple enough. Basically from a high level view I'm trying to accomplish...
. $X='grep foo blah.log'
then 'mysql command SELECT foo FROM bar WHERE ' . $X
or something like that.
... (2 Replies)
Hi,
I am trying to write script to copy some files(/ppscdr/cdrp2p/temp/) from one directory to another directory using shell script. see the script below,
#!/bin/sh -f
dir_name=20061105
mkdir ${dir_name}
cd /ppscdr/cdrp2p/temp
pwd
cp p2p${dir_name}*.*... (4 Replies)