From nobody Sat Feb 11 16:13:19 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PDbHm3K9Mz3pHvg for ; Sat, 11 Feb 2023 16:13:24 +0000 (UTC) (envelope-from peo@nethead.se) Received: from ns1.nethead.se (ns1.nethead.se [5.150.237.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "ns1.nethead.se", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PDbHl484pz46MM for ; Sat, 11 Feb 2023 16:13:23 +0000 (UTC) (envelope-from peo@nethead.se) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nethead.se header.s=NETHEADSE header.b="oF/vJBi1"; spf=pass (mx1.freebsd.org: domain of peo@nethead.se designates 5.150.237.139 as permitted sender) smtp.mailfrom=peo@nethead.se; dmarc=pass (policy=none) header.from=nethead.se X-Virus-Scanned: amavisd-new at Nethead AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nethead.se; s=NETHEADSE; t=1676132000; bh=8d6NkGiPQuAYM3dMStIVh44SmLIOz8Rm0y6INOrjNGY=; h=Date:Subject:To:References:From:In-Reply-To; b=oF/vJBi1OrucZVyU24pdnERhFUsrTb91ZxqgCWG05jmMryn9wUEhl0avEqDdYn2Dw +NYgwKn5VN/shcnjPbon2Z8YvUHHD6o1z+wfJK3xrCd6BOjHoWK3y4pRNwRT1f6yJl AGs+MMRptLxocpiDth5TupUxr7Syu9RCUPsXVXQE= Message-ID: Date: Sat, 11 Feb 2023 17:13:19 +0100 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: remove double quote character from file names Content-Language: en-US To: questions@freebsd.org References: <105187d9-2510-9209-8b35-c273aa20076b@qeng-ho.org> From: Per olof Ljungmark In-Reply-To: <105187d9-2510-9209-8b35-c273aa20076b@qeng-ho.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; DMARC_POLICY_ALLOW(-0.50)[nethead.se,none]; R_SPF_ALLOW(-0.20)[+ip4:5.150.237.139]; R_DKIM_ALLOW(-0.20)[nethead.se:s=NETHEADSE]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:8473, ipnet:5.150.192.0/18, country:SE]; FROM_HAS_DN(0.00)[]; DKIM_TRACE(0.00)[nethead.se:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4PDbHl484pz46MM X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N On 2/11/23 16:45, Arthur Chance wrote: > On 11/02/2023 14:58, Per olof Ljungmark wrote: >> Hi all, >> >> A little help on the way, I need to find and remove the double quote (") >> character from all files in a directory structure containing hundreds of >> thousands of files. >> >> I am sure plenty of you have done this before... I've gotten as far as >> >> find . -type f -name '*"*' -exec rename 's|"|in|g' {} \; >> find: rename: No such file or directory >> >> The find part works but not renaming so I'm missing something there. > > There's no rename command in the base system. Perhaps you meant to > install the sysutils/rename pkg but forgot? > No, I thought rename was part of the base system stupid me. So, without installing more ports I suppose sed(1) could do the job?