1 2 3 4 5 6 7 8 9 10 11 12 13
open Arg open Scanf open Printf open Unix let argnum = Array.length Sys.argv let _ = if argnum >= 2 then let fd = openfile Sys.argv.(1) [Unix.O_RDWR;Unix.O_CREAT] 0o666 in close fd else Printf.printf "ERR only one argument\n"