Search : in
By :

Launch and run the commands from shell script

Last answer on Feb 10, 2009 6:18:30 am GMT Hari, on Sep 18, 2008 8:33:15 am BST 
 Report this message to moderators

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

Configuration: Linux
Firefox 2.0.0.6

Best answers for « Launch and run the commands from shell script » in :
Windows 7: Adding the Run command to the start menu ShowWindows 7: Adding the Run command to the start menu Issue Solution Issue As for Vista, the Run command is not present by default in the Start menu of Windows 7. You must type Run in Search to access it. Solution If you want to...
Shell script for telnet and run commands ShowShell script for telnet and run commands Issue Solution Note Issue I have made a shell script which can telnet automatically and run commands on the other machine and end the telnet session without any interact from the user, only he...
[Ubuntu] Executing a script at startup and shutdown Show[Ubuntu] Executing a script at startup and shutdown To execute a script at startup To execute a script at shutdown To execute a script at startup of Ubuntu Edit /etc/rc.local and add your commands. The script must always end with...
Linux - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence the name "shell". The shell therefore acts as an intermediary between the operating system and the user thanks to command lines...
UNIX system - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence its name "shell". The shell therefore acts as an intermediary between the operating system and the user using command lines...
UNIX Commands ShowTable of the main UNIX commands Unix Commands Description Options ls lists the content of a directory -a Displays all files, including hidden files -I Displays a...

1

Hari, on Sep 18, 2008 1:18:08 pm BST
  • +1

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

#! /bin/bash

(
ps
sleep 1
) | telnet 192.168.100.3

exit

Reply to Hari

2

damu, on Nov 13, 2008 11:04:34 am GMT

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

Reply to damu

3

 ganesan.c, on Feb 10, 2009 6:18:30 am GMT

Dear dhamu

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

Reply to ganesan.c