in reply to Re^2: Parsing output from a command
in thread Parsing output from a command
I have subsequently tested it and it works as I expect it to. I did find that on my AIX, the output of the command isn't exactly the same as described by the OP - specifically there are two spaces before hdisk## but after accounting for that, it works as intended. Update: The modifications I made that may make the difference (as I said, it worked as expected) were as follows:
local $/ = "\n hdisk"; my ($disk) = $_ =~ /\s+(hdisk\w+)/;
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Parsing output from a command
by BrowserUk (Patriarch) on Mar 24, 2009 at 18:33 UTC | |
by Limbic~Region (Chancellor) on Mar 24, 2009 at 19:06 UTC |