From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from nac.no ([129.240.2.40]) by archone.tamu.edu with SMTP id <45338>; Wed, 12 Feb 1992 11:20:33 -0600 Received: by nac.no (5.64+IDA/Babel-1.6/6.0) id AAnac07447; Wed, 12 Feb 1992 18:19:22 +0100 Received: by bibsyst.no (/\==/\ Smail3.1.21.1 #21.19) id ; Wed, 12 Feb 92 14:19 WET Message-Id: From: tore@bibsyst.no (Tore Morkemo) Subject: smart rm fn... To: rc@archone.tamu.edu (rc list) Date: Wed, 12 Feb 1992 08:19:14 -0600 X-Mailer: ELM [version 2.3 PL11] -- Hei ! I just got the idea of writing a smart rm function but I havent got too much exeperience in writing rc scripts, maybe one of you rc-gurus could take this as an exercise. I don't like the idea of fn'ing rm to move the file to /tmp or somewhere else ( fn rm {mv $* /tmp} ) since this tend to fill up /tmp. But I have to admit that I just removed a file that I shouldn't have removed....:-( So what about this idea: Make a fn that REMOVES only the files that I never need, like .o files, and MOVES all the files that ends with .c .h etc. to /tmp. The file extensions that I would like to move should be put in a list like : move_file_extensions=(.c .h .1 .C .cpp) PS: Actually I just came up with a better solution to the entire problem, but I still think it's a good rc exercise and I would like to see a good solution..... Tore. +----------------------------------------------------------------------+ ! Tore Morkemo, Bibliotek-Systemer A/S, N-3250 Larvik, Norway ! ! uucp: ...!bibsyst.no!tore Tel: +47 34 82 202 ! ! tore@bibsyst.no Fax: +47 34 85 185 ! +----------------------------------------------------------------------+