From owner-freebsd-questions@freebsd.org Sat Aug 5 12:01:27 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F824DD1C81 for ; Sat, 5 Aug 2017 12:01:27 +0000 (UTC) (envelope-from bsduser@cloudzeeland.nl) Received: from ares.cloudzeeland.nl (cloudzeeland.xs4all.nl [83.161.133.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloudzeeland.nl", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 300B172886 for ; Sat, 5 Aug 2017 12:01:25 +0000 (UTC) (envelope-from bsduser@cloudzeeland.nl) Received: from ares.cloudzeeland.nl (unknown [10.10.10.32]) by ares.cloudzeeland.nl (Postfix) with ESMTP id 6FE0E4FAD1A5 for ; Sat, 5 Aug 2017 13:58:48 +0200 (CEST) Received: from [10.10.10.34] (styx.zeeland24.nl [82.176.127.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by ares.cloudzeeland.nl (Postfix) with ESMTPSA id 35DB24FAD1A1 for ; Sat, 5 Aug 2017 13:58:48 +0200 (CEST) To: freebsd-questions@freebsd.org From: Jos Chrispijn Subject: Wildcard on redirection Organization: Userland rocks! Message-ID: <25f022f4-4778-3f28-8d78-1f1b292f849e@cloudzeeland.nl> Date: Sat, 5 Aug 2017 13:58:50 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: nl X-Virus-Scanned: ClamAV using ClamSMTP on ares.cloudzeeland.nl X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Aug 2017 12:01:27 -0000 I have this number of .log files which I would like to empty. Using echo > *.log unfortunately doesn't work so I created foreach file in (/myfiles/log/*log) echo "" > $file end but that sequence is not recognized at all. Can you tell me how to solve? Thanks!