Hamilton LaboratoriesHamilton C shell 2012User guideSamples

newfiles.csh

Oregon Coast

newfiles.csh
Previous | Next

#  List all the files or directories in the current directory that
#  do not occur in the specified directory.

#  Copyright (c) 1990-2012 by Hamilton Laboratories.  All rights reserved.


proc newfiles(olddir)
   local i
   if ( $#olddir == 0 ) @ olddir = "."
   foreach i (*)
      if (! -e $olddir\$i) calc i
   end
end

newfiles $argv

Previous | Next