Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!sunybcs!uhura.cc.rochester.edu!rochester!kodak!gizzmo!mark From: mark@gizzmo.UUCP (mark hilliard) Newsgroups: comp.unix.i386 Subject: answer to nawk problem Message-ID: <112@gizzmo.UUCP> Date: 3 Dec 89 23:27:31 GMT Reply-To: mark@gizzmo.UUCP (mark hilliard) Organization: gizzmo, Walworth, NY Lines: 23 OK, I found out that this was a simple case of RTFM! Sorry, the problem is that the shell "if" responds for the first statement if a 0 is returned from the test, but the awk "if" is derived from the C "if" in that if a 1 is returned from the test then the first statement is exicuted, just the reverse! Soooo, since the test -d returns a 0 if true the awk if ran just the oppisite from what I expected. Iffy enough for everyone! $3 > 99 { if ( system("test -d "$6)) { printf("\r\n--- %s does not exist, creating it and moving files --- \r\n",$6) system("mkdir "$6) } else printf("--- %s exists, moving files now ---\r\n",$6) } Mark Hilliard N2HHR rutgers!rochester!kodak!gizzmo!mark