Launch and run the commands from shell script [Solved/Closed]

Report
-
 sam -
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

2 replies

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

#! /bin/bash

(
ps
sleep 1
) | telnet 192.168.100.3

exit
1
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

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
but what to do to activate the code
dear dhamu

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