2 let process_output_to_list2 = fun command ->
3 let chan = open_process_in command in
4 let res = ref ([] : string list) in
5 let rec process_otl_aux () =
6 let e = input_line chan in
11 let stat = close_process_in chan in (List.rev !res,stat)
12 let cmd_to_list command =
13 let (l,_) = process_output_to_list2 command in l;;
15 let lines = cmd_to_list "tput cols" in
16 prerr_endline (List.hd (lines));;