in reply to Data manipulation on a file
use strict; use warnings; use Data::Dumper; $Data::Dumper::Sortkeys=1; my %hosts; for (qx(mount | grep 'type nfs' | awk -F/ '{print \$1,\$3}' | sort)) { chomp; my ($host, $mp) = split; push @{ $hosts{$host} }, $mp; } print Dumper(\%hosts);
See also:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Data manipulation on a file
by sstruthe (Novice) on Sep 30, 2015 at 15:10 UTC | |
by toolic (Bishop) on Sep 30, 2015 at 15:16 UTC | |
by SuicideJunkie (Vicar) on Sep 30, 2015 at 17:13 UTC | |
by sstruthe (Novice) on Oct 01, 2015 at 09:30 UTC | |
by Corion (Patriarch) on Oct 01, 2015 at 09:34 UTC | |
by sstruthe (Novice) on Oct 01, 2015 at 10:26 UTC | |
by sstruthe (Novice) on Oct 02, 2015 at 20:50 UTC | |
by CountZero (Bishop) on Oct 02, 2015 at 21:23 UTC | |
| |
by sstruthe (Novice) on Oct 04, 2015 at 18:20 UTC |