From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id F00A9158020 for ; Tue, 22 Nov 2022 12:17:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B54C4E0CA4; Tue, 22 Nov 2022 12:17:12 +0000 (UTC) Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6C32CE0C8D for ; Tue, 22 Nov 2022 12:17:12 +0000 (UTC) Received: by mail-qv1-xf32.google.com with SMTP id s18so8346041qvo.9 for ; Tue, 22 Nov 2022 04:17:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=ne9VPs4b5lbB5/RCr+F1WYGhNj1fmodNWnMe9j7W9g8=; b=WqygQYztMUblqb3Xe0D1+3cg+hg9DwN772sLy9PhRZVqFuEW0fbcV/YftUGs6peM7r FbXx8m4nFbJTMSg2hqY9NezTnRWwFmmUOXfjvvl4Dh2V9sifaACMpGIoDgdWYr46xiRC FvNlvZIqUgKaoElbCDHgkyjMlEb6gFJPBxfD7lowCBhqrsAKPa1kpOlJmSSzQCpQdlZO NDw2I27Y9x5GIxmf0DABcwNqsVZueX514V9VGXi7FR6w58lV54hR9KngVkdau8gFb3tC r5WeoXnbF8IC26S3S4cwRrmanXMwgFmi+mDB3Vu5CGONEEN73ssS/A9UYz6a8pFiRQxc K5DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:openpgp:from:references:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ne9VPs4b5lbB5/RCr+F1WYGhNj1fmodNWnMe9j7W9g8=; b=V0UmY6sv+bVM8iz3kMC6PTY5ufT6LfZESEcBA91SkLQe+R/qdq+tg5iZ/QwK9Pqh8C tfCOptHdDudS0dAZ5a6TUOvwUdie3d3m4ELg/a3yWi3us21A3f82KHORROahcrksjecR wBlMmUysmjC27585YzUp0upkSwyeR8SEMjtUpgN2LGsyilOYRLGdmB95ZsS8VI2k4mpW XohoGiFsrVo/8GYn7g2/hk009VXVKsLvCS6ATm/Ai6So+8TDO0dA5eBbQvtw2A0BwwTp HemsTRDbjRS2WnG3R/DvUnWRyPe4IsinXUQntt1YTnnCA/QC9PDVqkWKg/afOMWinA66 Gm6g== X-Gm-Message-State: ANoB5pkNt5EJxJbvCKoEz4Ao6MxSiMmdYIhF0pyXKwyLy71oU2r7vW0/ yV8gsPO+GoqhF+72xUMvtZk= X-Google-Smtp-Source: AA0mqf7lI23DbvdvDQb7wxdOFhOgXoXQroSk1A02Gf7RcL8XiqiEZ1Qfkp42H06TNmvq/OjPasU3vA== X-Received: by 2002:ad4:50ac:0:b0:4bb:ce03:5714 with SMTP id d12-20020ad450ac000000b004bbce035714mr10098698qvq.30.1669119431594; Tue, 22 Nov 2022 04:17:11 -0800 (PST) Received: from [10.8.8.18] ([37.19.221.74]) by smtp.gmail.com with ESMTPSA id j29-20020ac8405d000000b003a5172220dbsm8365208qtl.8.2022.11.22.04.17.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Nov 2022 04:17:11 -0800 (PST) Subject: Re: [gentoo-user] Dolphin and adding a option, if it exists. To: gentoo-user@lists.gentoo.org References: <6ef36d93-4d8a-d9a4-ca71-396040103a25@gmail.com> <20221006134500.6f0812b9@digimed.co.uk> <62ebaa87-f750-b233-f8b4-ee50ef00bdfa@gmail.com> From: Dale Openpgp: preference=signencrypt Autocrypt: addr=rdalek1967@gmail.com; prefer-encrypt=mutual; keydata= mQINBGFSciYBEADcEGMyJBSuavKO/XKUVvgkxck7Nl8Iuu8N2lcnRji/rSKg5c1Acix1ll9i oW8JBCHwvn0+Xy60BvEsqcup3YSHw5STl/bR1ePEehtnYrg8FdjdS91+B805RfnKMm69rFVI wLSBHQrSG1yxHd8CloWoEdhmVtP24buajbh114bgXd9ahtpZrCVMrWdWYUg2mEXguGV5uNAh Rf8SWxDNc79w24JxsV34a8niMUYMjzWr0rafIbzk732X38vGjVMLo/2mMpkbp9mPp++LHoY+ 0Pet8zxxdXPJSCd475kza1AD+hhSyBZXB9yknYWgyY3cZe1rGmooJSi2KX4QxO7npwLThcO1 be6KKRkd35+Fi/a1BzVOHsZMiK/gcwxEFoMd27gir4ehaeHJfFXl+65w4hj0EsOZSxrJrm2C R50g5By2czSKP1bADEygFNpIJj51AR+wM88NImG2RPtlT2maYBzazvF05g65cdHXGp1C7W5P wwwKU2DgABB2t7N7z5A69LnryBRw4zUYDRRYLTYlBlYgg+xILm2c0OrBdxJgLJa7JE50Eo25 d3PFwt9J0gYvqy6sPFLl9So0sDg9zm0hKQtXOP5kgropUFGrNoJI+mjwF4rYLRBVzZwNAvlO OhEvHubBo3mEllv4x+FeptwXZxlk7gUsdqI8AxnFB8K9wi6FVQARAQABtBtEYWxlIDxyZGFs ZWsxOTY3QGdtYWlsLmNvbT6JAk4EEwEIADgCGyMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AW IQQSG1h01ruv/WNXc3Q3RqOgiQH1GwUCYVJy8gAKCRA3RqOgiQH1G+waEACeTZCt77jnRAmQ AV7otKuZekDWiLi3Eig8tj5ZJiCNSYA/hIxzmexRP0GMqjitcXK1iGw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11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0 SeaMonkey/2.53.14 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: 50908121-e050-4695-abb0-f91fe605870f X-Archives-Hash: 732408a0d13dbb0c8c971c8e92dd17ff Frank Steinmetzger wrote: > Am Tue, Nov 22, 2022 at 03:59:27AM -0600 schrieb Dale: > >>> If you still want to stick to a terminal solution akin to mv, then there is >>> no way around a little script which wraps mv by extracting the extension and >>> filename base. You could also add some “intelligence” with regards to >>> directories, in order to reduce the amount of effort required to use the >>> command—in case your directories follow some schema or are constant. >>> >>> >>> #!/usr/bin/sh >>> >>> [ "$#" -ne "2" ] && exit 1 >>> SRC="$1" >>> DST="$2" >>> >>> SRC_EXT="${SRC##*.}" >>> DST_BASE="${DST%.*}" >>> >>> # remove destination for the case that the extensions differ >>> rm "$DST" >>> >>> mv "$SRC" "${DST_BASE}${SRC_EXT}" >>> >> I finally got a chance to try this.  I saved it and made it executable.  >> It runs but gave me this error.  >> >> >> dmv torrent/video_name-old-place.mp4 video-name-new-place.mp4 >> bash: /bin/dmv: /usr/bin/sh: bad interpreter: No such file or directory >> dale@fireball ~/Desktop/Crypt/Series $ >> >> >> My scripting skills are minimal at best.  Still, I kinda got what your >> script was doing.  Those who have known me for a while understand how >> miraculous that is.  ROFL  I did some googling.  It seems to not be able >> to find the 'shebang' part.  Sure enough, sh isn't located in /usr/bin >> here.  It's in /bin tho.  I edited that line so it can find it.  When I >> tried it, it worked but noticed another problem. […] > Well, it would have been boring to provide you with a turn-key solution. ;-) > Congrats on getting it working. In my Arch setup, sh is in /usr/bin. A > flexible solution is to use #!/usr/bin/env sh, which looks the command up > before executing it. > >> I added a little . on that last line before the extension bit.  I'm a >> happy camper. > Give me a nudge if you want the more luxurious version with interactive > selection of the overwrite destination. I think I already started a > prototype somewhere, but can’t find it right now. > Feel free to share.  Even if I don't use it, someone else may find it and make good use of it.  It's one reason I posted the corrected version and why I changed what I did.  Someone else just may run up on this and find it helpful as well.  If possible and you have time, describe a bit what each part does.  Usually when I do this, I have several videos, anywhere from 10 to sometimes 30 or more.  Sometimes I wish it could 'detect' which new one goes with which old one.  Thing is, I don't know if a script can do this or not.  Sometimes the new is named pretty different from the old.  I don't think a script could do it reliably.  If things were more consistent, maybe, but there is a lot of differences at times.  Your scripts at least keeps the extension correct without adding any more effort on my part, except having to type dmv instead of mv.  I chose d since the first letter of my name is d.  It was something.  lol  The current script sure is handy tho.  Dale :-)  :-)