$cmd = 'fdisk -c'.' '.$device; system $cmd; system " n p 1 1 +G t 83 w"; ## this however enters the fdisk prompt and waits for the above inputs !!