[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Emptying files



On Wed, Feb 16, 2000 at 02:44:11PM -0500, dan@cg619985-a.adubn1.nj.home.com wrote:
> I need a utility that will take a list of files using standard wildcards
> and empty their contents, but not deleting them. Has anyone stumbled on
> something like this? Thanks a bunch.

how about

	for i in <filelist>
	do
		cat /dev/null > $i
	done

HTH

-- 
Weasel                            http://www.cosy.sbg.ac.at/~ppalfrad/
PGP/GPG encrypted messages prefered. See my site or finger -l ppalfrad
----------------------------------------------------------------------
          Yes means No and No means Yes. Delete all files [Y]?


Reply to: