BEGIN { char x[ 128 ]; y=1; } /' / { if (y==1) { x=$1; y=0; } else x=substr($1,2); if (x=="Directory") { printf("dir %s \n",$2); printf("settype settypes obey\n"); printf("obey settypes\n"); printf("delete settypes\n"); } } END { printf("*quit\n");}