From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by archone.tamu.edu id <45332>; Wed, 12 Feb 1992 11:34:14 -0600 From: Byron Rakitzis To: rc, tore@bibsyst.no Subject: Re: smart rm fn... Message-Id: <92Feb12.113414cst.45332@archone.tamu.edu> Date: Wed, 12 Feb 1992 11:34:01 -0600 This is just off the top of my head, but the problem is exactly suited for the ~ operator: fn rm { for (i) { if (~ $i *^$move_file_extensions) { mv $i /tmp/save_dir } else { builtin rm $i } } } There, how's that? (you'll want to add options etc. but I haven't got time right now)