Search Results

Search: Posts Made By: Renjesh
771
Posted By Renjesh
need a help in expect script
Hi All,

How to pass variable inside expect script ?

expect -c ' <need to pass $var here> interact'

Please help me out

Thanks in advance,
Renjesh
3,396
Posted By Renjesh
Help with Expect in Shell Script
Hi All,

I have a expect script which is working for single server, but if i am trying to pass value of the variable inside expect, it is not working. Please see below :-
expect -c 'spawn ssh...
2,242
Posted By Renjesh
Junk characters in mailx output
I have script which send a mail with top output. The script look like
$ cat health.sh
#!/bin/sh
maillist="email address"
rm /home/rtq1/file
top -n 1 | head 15 > file
cat file | mailx -s "Daily...
1,026
Posted By Renjesh
No. Passwordless login will not allow in my test...
No. Passwordless login will not allow in my test servers
1,026
Posted By Renjesh
Need help in implementing expect
Hello All,

I am trying a shell script for automatically login to test servers and pulling the output of top command from all using expect.

----snippet of code ---
#!/usr/bin/expect -f...
1,226
Posted By Renjesh
what happened ?
what happened ?
1,226
Posted By Renjesh
Here is the code :- choice="" tgtser="" ...
Here is the code :-

choice=""
tgtser=""
function menu
{
clear
echo "-------------------------------------------------------"
echo " * * * * * * * Subversion Main Menu * * * * * *...
1,226
Posted By Renjesh
multiple looping with case and funtion showing error, Please help
Hello All,

I have code as follows :-
while true do
[calling a function]
{opening a case1 statement}
1)
[Calling another function]
{opening another case2 statement} ...
1,700
Posted By Renjesh
Thank you for your help ...
Thank you for your help ...
1,700
Posted By Renjesh
I will show the entire code and then probably you...
I will show the entire code and then probably you can help me ..

# Ver Date Description Analyst
# --- ---- ----------- -------
# A01 09/08/11 ...
1,700
Posted By Renjesh
Thank you for your help ... I don't want to...
Thank you for your help ...

I don't want to call another function for doing this ..
Is there something like "goto" command in which i can move the flow of the script ?
1,700
Posted By Renjesh
Need a help to move control to another line in my script
I have menu option in my script and in that i have 4 options like below :-

echo "Please select a target server .."
echo "[1] AIX - AIX1"
echo "[2] AIX - AIX2"
echo...
1,725
Posted By Renjesh
This will work if the pattern is not continous....
This will work if the pattern is not continous. But XML is not coming as line by line. Like below :-

<RequestBillsRsp...
1,725
Posted By Renjesh
Editing XML file
Hi All,

i have an XML file like :-

<RequestBillsRsp...
1,298
Posted By Renjesh
DIR :- location form there i want to take...
DIR :- location form there i want to take backup(both files and directory needed)

DEST :- Location where i need the backed files

What ever is there in Array, i need to copy whether it is a file...
1,298
Posted By Renjesh
Problem with array and creating directories
I have an interesting requirement. I have declaried an array like :-
arr=`find . ! -name "." | xargs -I {} echo {} | cut -c 2-${#}`

Then i will try to access the array elements like :-
i=0
for...
1,227
Posted By Renjesh
I want to do something like if pattern found...
I want to do something like

if pattern found

do something
else

do something
...
1,227
Posted By Renjesh
Please help me to do some filtering
I have to grep a pattern. scenario is like :-

Suppose "/etc/sec/one" is a string, i need to check if this string contains "one" using any utility


something like

if /etc/sec/one | grep ;...
2,284
Posted By Renjesh
Yes, it is working ... Thanks a lot
Yes, it is working ...

Thanks a lot
2,284
Posted By Renjesh
I will clarify a little more with an example ...
I will clarify a little more with an example

I have two strings ..

/opt/src/deafult.cfg and /opt/src/esr/common/test1

From this i want only "default.cfg" and "test1" ...

Note :- it is...
2,284
Posted By Renjesh
In shell scripting
In shell scripting
2,284
Posted By Renjesh
Need to take one part from a string
I have a string something like "/opt/src/default.cfg" OR /opt/src/common/one

This whole string stored in an array. The problem is this string is not constant and it will keep on changing as lot of...
2,203
Posted By Renjesh
Hi All, it is working fine now ... set -A...
Hi All,

it is working fine now ...
set -A arr `find . ! -name "." | xargs -I {} echo {} | cut -c 2-${#}`

This works for me ..

Thanks a lot
Renjesh
2,203
Posted By Renjesh
Now it is working, but "." is still there with...
Now it is working, but "." is still there with the output. I want to remove the "." then store data in array.
$ ./test.sh
./two
2,203
Posted By Renjesh
If i put that (), it is throwing a syntax error...
If i put that (), it is throwing a syntax error .. :confused:
$ ./test.sh
./test.sh[2]: Syntax error at line 2 : `(' is not expected.
Showing results 1 to 25 of 142

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