+let rec cmd_trim ~input_sep ~output_sep ~chan (top, left, right, bottom) files =
+ let csv = List.concat (List.map (load ~separator:input_sep) files) in
+ let csv = trim ~top ~left ~right ~bottom csv in
+ save_out ~separator:output_sep chan csv
+
+and trim_flags flags =
+ let set c =
+ try ignore (String.index flags c); true with Not_found -> false
+ in
+ let top = set 't' in
+ let left = set 'l' in
+ let right = set 'r' in
+ let bottom = set 'b' in
+ (top, left, right, bottom)
+