Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Aug 2017 14:13:06 +0200
From:      Ralf Mardorf <>
Subject:   Re: Wildcard on redirection
Message-ID:  <20170805141306.60e720f5@archlinux.localdomain>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sat, 5 Aug 2017 13:58:50 +0200, Jos Chrispijn wrote:
>I have this number of .log files which I would like to empty.
>echo > *.log
>unfortunately doesn't work so I created
>foreach file in (/myfiles/log/*log)
>   echo "" > $file
>but that sequence is not recognized at all.
>Can you tell me how to solve? Thanks!

I suspect the dot isn't useful at all, I guess with or without the dot
"analog" would be "*log", too, but actually your shell might treat the
dot in a different way.


echo "" | tee *log

does the trick.

Want to link to this message? Use this URL: <>