Launch and run the commands from shell script

Solved/Closed
Hari - Sep 18, 2008 at 03:33 AM
 sam - Dec 27, 2009 at 03:34 AM
Hello,

I have a requirement to launch a buzybox (Qemu)shell and needs to pass the commands to get the result. How i can achieve this.

for example:

I have the running qemu and i am telnetting to get shell.

Open the terminal and do a
"telnet 192.168.100.3"
this command will takes to a busybox shell now type "ps" command this will gives all the running process inside the qemu.

Now i want to automate the above steps in a shell scripting something like
===============
#! /bin/sh
telnet 192.168.100.3
ps
===============

Please Help Me.
-Hari
Related:

2 responses

Got it!.... below code works for me Thanks......

#! /bin/bash

(
ps
sleep 1
) | telnet 192.168.100.3

exit
1
Hi,,


I am using ksh. From shell script I am executing a command to set a clearcase view. After the view is set there is a new subshell comig up. In that subshell i want to execute a command.

like

ct setview viewname
. .profilie

can yu please tell me how to achieve that
0
but what to do to activate the code
0
dear dhamu

for automating clear case give the command from atria path.profile changes if u directly setview
0