#!/usr/bin/env perl use strict; use warnings; { local $/ = "\ndirectory"; while () { next if $. == 1; /(\S+)\D+(\d\S+)\s+(\/\S+|)[^(]+\(\s*([^)]+)/; my ($path, $usage, $threshold) = ($3 || $1, $2, $4); print "path=$path; usage=$usage; threshold=$threshold\n"; } } __DATA__ Type Path Policy Snap Usage -------------------- ------------------------------ ----------- ----- -------- directory /ifs/home/admin enforcement no 32K [hard-threshold] ( 1.0G) [hard-threshold-exceeded] (no) [container] [usage-with-no-overhead] ( 32K) [usage-with-overhead] ( 103K) [usage-inode-count] (4) directory /ifs/home/ftp enforcement no 31B [hard-threshold] ( 1.0G) [hard-threshold-exceeded] (no) [container] [usage-with-no-overhead] ( 31B) [usage-with-overhead] ( 6.0K) [usage-inode-count] (3) directory /ifs/gpd/data/trufusion/dat... enforcement no 43G /ifs/gpd/data/trufusion/data0003 [hard-threshold] ( 80G) [hard-threshold-exceeded] (no) [container] [usage-with-no-overhead] ( 43G) [usage-with-overhead] ( 95G) [usage-inode-count] (606) #### path=/ifs/home/admin; usage=32K; threshold=1.0G path=/ifs/home/ftp; usage=31B; threshold=1.0G path=/ifs/gpd/data/trufusion/data0003; usage=43G; threshold=80G