Hi all,
Now I want to write a test script using bash and expect script
I write a expect script as follows:
If I invoke the first command (/create_bsim.sh) , it work properly
If I want to login as another user named bsim using command ssh bsim@localhost , it can work properly. But after that, the test script will stop running.
what's the problem?
BRs
Damon
Last edited by Franklin52; 06-23-2010 at 02:20 PM..
Reason: Please use code tags
Testing some old script developed by different user.
#!/usr/bin/sh
case "$0" in
*/*) cmd="$0";;
*) cmd=`which "$0"`;;
esac
dir=`dirname "$cmd"`
node="$dir/."
echo $node
below two simple tests are failing, I am not seeing any Control+M characters in the script file and I am not able... (4 Replies)
Hi,
I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
Hello everyone,
I have 2 questions :
1) I have a backup shell script, let's call it backup.sh, that is called every hour as a cron job.
As a matter of fact a backup could last more than one hour.
It mounts a NAS and then do some rsync on important directories, so really I don't want to... (2 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hi can anbody explain the concept of test script with a simple test case and corresponding unix test script for the same?
I need to answer this in a interview.
Thanks !!! (2 Replies)
Hi all,
i am writing a script to test if some servers are down and prompt if test positive. i used rlogin and rsh then exit but the script when run, logs into the servers and stays.
pls what can i do to prevent the script from logging in i.e just check if logging in is possible? or what other... (1 Reply)