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

Re: Emptying files



On Wed, Feb 16, 2000 at 09:09:43PM +0100, Armin Joellenbeck generated a stream of 1s and 0s:
> Try the shell command echo:
> 
> 	echo -n '' > file
> 
> This redirect the empty string into file. The option -n avoids
> the default printed newline, so the file is really empty.
> 
> 	for x in *.*
> 	do
> 		echo -n '' > $x
> 	done
> 
> does the trick for several files. Instead of *.* use the pattern you like.

This will do for now, thanks, I should really learn bash syntax.


Reply to: