From nobody Sat Feb 11 17:32:05 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 4PDd2p5S5xz3phn9 for ; Sat, 11 Feb 2023 17:32:18 +0000 (UTC) (envelope-from paulbeard@gmail.com) Received: from mail-yb1-xb34.google.com (mail-yb1-xb34.google.com [IPv6:2607:f8b0:4864:20::b34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PDd2n60z1z4P14 for ; Sat, 11 Feb 2023 17:32:17 +0000 (UTC) (envelope-from paulbeard@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=ZTU3HHwg; spf=pass (mx1.freebsd.org: domain of paulbeard@gmail.com designates 2607:f8b0:4864:20::b34 as permitted sender) smtp.mailfrom=paulbeard@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-yb1-xb34.google.com with SMTP id b132so8752116ybc.12 for ; Sat, 11 Feb 2023 09:32:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=TdVPD8cnFkYajJW3uCjKzGrgHUDmzeAEHEJo+Vmou5w=; b=ZTU3HHwgk5LHtscBFZ3J3oxTptPlVCuvzbTQRYR2D1sO2I4b+Fd/th6qxEUh/X78+Q obHrBUTgE71MkAgJMEDaMwpKGi+I1hg+U5fe9WRLXHPgePk/xNCSDcf4+ItwILKUYg7s hn2HTGRk7Qdf10o5it/EFUWb2F0Xulp/IUGZPEZQjragJ1JPohdgCpfK0d9opgqYru3x 4SdoP6MKHOy1S5biY4mgz49/a9hBzCERJSITs9RQYvoihuF2Fxo5ZvbD2bPRckFgrB+g czPtyQaqxMiOxQ/nJ7VpTlh0ino1ZeeMs8w29CL385XiG/gGHrQfBGx0GCZIMUhR7x+Z ljdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TdVPD8cnFkYajJW3uCjKzGrgHUDmzeAEHEJo+Vmou5w=; b=Mv2n+vv2Y061OWn2FfaF7pJ2ITQvjWg0YeCwY1Wa2kYDK1jT+3zPMzBEDqt4yh8ZDQ ny/l8Z/bR1HJxvFeeQIzZ9NAd2dJ9zCg4KhIOGm93HcZg8bb264dJSb/d1ubb0kHpiOD 87mJvRuQtH3Tn3RB3pvO7rt8c5/WUb/Fh6clBh0mmqPMPTE0Kvodor1GIVE/Co2hchjQ w7XLdkasNu6BediPbfYESMdenVxkVPEQ5RqE1o/fBusIw/YdLD0C+cgWPz6jJ7i8Vsco 4JwenjofnCm/Q7zA5UrVcfrrpga23Ie1qY3151CH8jQvH7ExZl1z5UK1dvSHN1qD0tAF j1Hg== X-Gm-Message-State: AO0yUKUpvWHuXNtPtKstDBhcBMAQ++eKCm16i345i4wkiXpS/xqclG7u BqT6G4GmbtJJDwFlcDLIahahlfsSeJY+KZ+YUSgojVQQ X-Google-Smtp-Source: AK7set/aAC1qdMwpzwsCBy8PKHO/yxBWfwuMe0LyHLFt3Ks/jtB/2wKOryepouJ0+4Ai6+Y0K3jacj3PEZjkt6YbO+Q= X-Received: by 2002:a5b:a02:0:b0:8ac:dd92:1a0d with SMTP id k2-20020a5b0a02000000b008acdd921a0dmr1918536ybq.137.1676136736725; Sat, 11 Feb 2023 09:32:16 -0800 (PST) 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 References: <105187d9-2510-9209-8b35-c273aa20076b@qeng-ho.org> <119961fa-c43e-d78c-a0a1-0565535d0bb6@FreeBSD.org> In-Reply-To: <119961fa-c43e-d78c-a0a1-0565535d0bb6@FreeBSD.org> From: paul beard Date: Sat, 11 Feb 2023 09:32:05 -0800 Message-ID: Subject: Re: remove double quote character from file names Cc: questions@freebsd.org Content-Type: multipart/alternative; boundary="000000000000c99eb205f46ffeb5" X-Spamd-Result: default: False [-1.78 / 15.00]; MISSING_TO(2.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998]; NEURAL_HAM_SHORT(-0.99)[-0.992]; NEURAL_HAM_MEDIUM(-0.80)[-0.795]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b34:from]; ARC_NA(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MLMMJ_DEST(0.00)[questions@freebsd.org]; DKIM_TRACE(0.00)[gmail.com:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_NONE(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4PDd2n60z1z4P14 X-Spamd-Bar: - X-ThisMailContainsUnwantedMimeParts: N --000000000000c99eb205f46ffeb5 Content-Type: text/plain; charset="UTF-8" On Sat, Feb 11, 2023 at 9:29 AM Matthew Seaman wrote: > > The tools from the base system that you need here are find(1), sed(1), > mv(1) and sh(1). Something like the following _completely_ _untested_ > code: > > ``` > #!/bin/sh > > for oldfname in $( find . -type f -name '*"*' -print ); do > newfname=$( echo $oldfname | sed -e 's/"/in/g' ) > echo mv -nv $oldfname $newfname > done > ``` > > This prints out a list of 'mv' commands to effect the change you want. > Which, as someone else wisely said you should examine closely to ensure > it is actually doing the right thing. Then, when you're satisfied that > it is, change 4 to read: > > mv -nv $oldfname $newfname > > obvious, I expect, but when I have done this, I > it all to a file and then review it, add the mv or whatever command to each line, and then feed that to the shell. --000000000000c99eb205f46ffeb5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable



--000000000000c99eb205f46ffeb5--