Search Results

Search: Posts Made By: blazer789
8,379
Posted By blazer789
Works great, thanks !
Works great, thanks !
8,379
Posted By blazer789
Do I need to declare it again inside the awk....
Do I need to declare it again inside the awk. That variable gets changed time to time. So I would need a way to avoid declaring the variable inside the awk.
15,021
Posted By blazer789
Script in a file works but expect -c still...
Script in a file works but expect -c still doesn't work.

---------- Post updated at 01:00 AM ---------- Previous update was at 12:52 AM ----------

It would be great if some one could help me...
8,379
Posted By blazer789
use shell variable in awk command
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...
15,021
Posted By blazer789
I would appreciate, if you could please give the...
I would appreciate, if you could please give the command replacement for this as per your interpretation

expect -c 'spawn ssh $env(PUSER)@$env(PHOST1) "ls -l $env(P_BKP_PATH) | grep -i...
15,021
Posted By blazer789
That doesn't seem to be working. I tried giving...
That doesn't seem to be working. I tried giving backslash for all special characters.
15,021
Posted By blazer789
Use awk in expect.
I am trying to user awk in expect command. It seems to be failing. Can someone help me correct the syntax.

This is working fine
expect -c 'spawn ssh $env(PUSER)@$env(PHOST1) "ls -l...
1,253
Posted By blazer789
Thanks for the inputs. Very helpful.
Thanks for the inputs. Very helpful.
1,253
Posted By blazer789
Great, That works fine. A small question,...
Great, That works fine.

A small question, how do we make use of \t in echo command with -e flag.

I tried giving

eval $(echo echo -e " The hostname is \t \$PHOST${i}") # -> This doesn't...
1,253
Posted By blazer789
Thanks for the response, but I have a small issue...
Thanks for the response, but I have a small issue here.

This is how the script looks like

PHOST1=temp
i=1
for ((i=1;i<2;i++))
do
echo "The hostname is `eval echo \$PHOST${i}`"...
1,253
Posted By blazer789
Two substitutions in one echo
PHOST1=temp
i=1

I want to display the value of PHOST1 by making use of variable i inplace of 1


something like this

echo "$PHOST$i" # -> This doesn't seem to work.

Please provide me...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 01:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy