i'm new with Perl :)
i'm trying to write a simple script just open a CLI environment ( by executing bash command) and then send a command to that environment (only that environment familiar with this command)
for example: my linux is running in HP server machine. if i would like to see the memory configuration so under root user i need to execute: 'hpasmcli" and then i well get the following environment :
root@xxx:/>% hpasmcli HP management CLI for Linux (v2.0) Copyright 2008 Hewlett-Packard Development Group, L.P.
NOTE: Some hpasmcli commands may not be supported on all Proliant servers.
Type 'help' to get a list of all top level commands.
hpasmcli>
and now the need to enter "show dimm":
NOTE: Some hpasmcli commands may not be supported on all Proliant servers.
Type 'help' to get a list of all top level commands.
hpasmcli> show dimm
then i will get the memory configuration in the server.
so i'm tying to write a Perl script to make this simple task. i tried to use "expect" and "open(FH,"|/sbin/hpasmcli") but i was able just to log in to the CLI environment and not to send the command "show dimm"
Thank you for your help!