F
Fred
Hi everybody,
I am trying to convert some bash scripts to perl. How can I execute
the bash sequence below:
vxdmpadm listctlr all | grep GENESIS | awk '/ENABLE/ {print $1}' |
sort -t c -k 2,3n | tr "\n" " "
This command give me the following result:
root@fj50in># vxdmpadm listctlr all | grep GENESIS | awk '/ENABLE/
{print $1}' | sort -t c -k 2,3n | tr "\n" " "
c4 c5
The vxdmpadm command result:
root@fj50in># vxdmpadm listctlr all
CTLR-NAME ENCLR-TYPE STATE ENCLR-NAME
=====================================================
c0 Disk ENABLED Disk
c3 EMC_CLARiiON ENABLED EMC_CLARiiON0
c2 EMC_CLARiiON ENABLED EMC_CLARiiON0
c5 GENESIS ENABLED GENESIS0
c4 GENESIS ENABLED GENESIS0
I tried using chop, but the "awk" command part appears not working:
chop (my $status = `(((vxdmpadm listctlr all) | grep GENESIS) | awk
'{print $1}')`);
print "\n\nmake exit status:\n$status\n";
Results:
make exit status:
c5 GENESIS ENABLED GENESIS0
c4 GENESIS ENABLED GENESIS0
TIA,
Fred
I am trying to convert some bash scripts to perl. How can I execute
the bash sequence below:
vxdmpadm listctlr all | grep GENESIS | awk '/ENABLE/ {print $1}' |
sort -t c -k 2,3n | tr "\n" " "
This command give me the following result:
root@fj50in># vxdmpadm listctlr all | grep GENESIS | awk '/ENABLE/
{print $1}' | sort -t c -k 2,3n | tr "\n" " "
c4 c5
The vxdmpadm command result:
root@fj50in># vxdmpadm listctlr all
CTLR-NAME ENCLR-TYPE STATE ENCLR-NAME
=====================================================
c0 Disk ENABLED Disk
c3 EMC_CLARiiON ENABLED EMC_CLARiiON0
c2 EMC_CLARiiON ENABLED EMC_CLARiiON0
c5 GENESIS ENABLED GENESIS0
c4 GENESIS ENABLED GENESIS0
I tried using chop, but the "awk" command part appears not working:
chop (my $status = `(((vxdmpadm listctlr all) | grep GENESIS) | awk
'{print $1}')`);
print "\n\nmake exit status:\n$status\n";
Results:
make exit status:
c5 GENESIS ENABLED GENESIS0
c4 GENESIS ENABLED GENESIS0
TIA,
Fred