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) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C35BA158020 for ; Tue, 22 Nov 2022 10:07:19 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 703DAE0C9A; Tue, 22 Nov 2022 10:07:14 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B5501E0C87 for ; Tue, 22 Nov 2022 10:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1669111626; bh=nc6uXu+Rck99/cQisRDvm16mkaa6kUmmz+rG24fSTHY=; h=X-UI-Sender-Class:Date:From:To:Subject:References:In-Reply-To; b=kTGcdQGxyiMb6nXGmLTaiV/2KL1iwB2H+CA3b8yKtR/aQ/g4eiKqOKB/dfQ4kMNV+ ceLYiZ1kNjdXieRid4qqVO45a6VBuekSKgfpzaXw8cn9QbnkUjxSmrzMoU669ebAyp /g/+bn6h+FomKLtoPdRjyy6ltGfDOSxVOolOw1tg6JT0mlz0qai2T6v+BUvWvyEua2 9zh1mz4Qw655iokbJrGIh9LE4GUUnxfGWZsI9Flx0xt6oMQAdyfsishBVjEuReQGnO CQ4za/+AlZ602dv1dtCgSpJv+4aNhDHXt+dQ85ClOsWfglk0+utHnOgx0ej9OcPHT4 rfU7GaU0h5CMQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from tp ([92.117.52.169]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mlf0K-1pOGUK3EAM-00ilx8 for ; Tue, 22 Nov 2022 11:07:06 +0100 Date: Tue, 22 Nov 2022 11:07:05 +0100 From: Frank Steinmetzger To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Dolphin and adding a option, if it exists. Message-ID: Mail-Followup-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> 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 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vS+x+XCaPS1dz+lU" Content-Disposition: inline In-Reply-To: User-Agent: Mutt 2.2.9; VIM - Vi IMproved 9.0 X-Provags-ID: V03:K1:VPe1K+zA7jc2pYHBzEPq2dqIoPbNMZkXzolA8rPCkCHxRog/rur R7OH9A6qz2imd9zYlN+fUE80wHOHpO/yJxz3RsnO0c5E+noZQPVspSVG+Ky5lf02+jwhQa7 +7GVFtPTmfImCTFfU7LyDwSFMmRLWUlJOpI53S8PzckyatnulcdQtIOTidaQ41IUGETGR6h EuvQEN9z9piUcHK7fCRiA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Zg0W5wZAY+o=;LYi6m1AM8uQHfhe861g4xmahohO AUufldRmRWOOIljk53D1hyFkHu67tu8EtxlCDA7ukVriKfsLLprEcl9AdHMCu26ni2zXV3Csk tgYOAXKMkSZ9i0bfIK31FP6+aTcQxLiJ1RP0CM+9//AG8SjmxsiP1Vtgmxa8Buu0ATHyuuP6H UIR3KbVDGfyEovgZ66Gu/looT7TBvcTFWMLOU3XVN2UFjdjDxWbR5liK5hX0WcMqqx1WXyjZg QjAJ2zJlDgtjJh3J/OzgM8VZhsl5wIhRkwE6PIMKeZZcWlb/ICLEmiJprv5gc5MTfpfHYTfhz OoI9/OWBaeAgYeBCH1AMgEi46R68PeQuNqTYV9DKgcSsh51l8X7PkNzn2Dc7uisY6RN+BltXK /wNJIhNrsu1VUG92ZOWfmdadKMBDp4mEp1fst7sT34Gzy5u694PxYzJmrsHkCoutiTrMuCkV7 FX7d8IfNG8TixG8X7W7ZyNFBc3mgAOdUM1chVLGIFA7zJh0M6zUAQKDmGlVyZ5JDI5qtWy+Ab lCRipw4t948ScmjiDuWIhVH9dzBj+T9plgqQpb1jhmlaIqnor/03OCu1ClMYuCy/5COEM4ZPQ 0pL4Vx9b7+JsLdifDrlUl/CTnFlITScf7Nb9ucFTy7opGF8G24vSraCSh+iDPSt1B3tkwSHtL 9B09b8BjF7ccZ2si7kfEhn8RQj2X2xbUbydTA1S1/hX7q3bZMYbwfWIxYwosVlCvd5HyAwT50 AslYlJmLmRg2R+D0nCAD2QrvnhIIpyVVCYuQUjiOLS6lvcAfh8Lx/OIKwcDyF9zOB64sBmNtj b09iNKlYzh3Z+EK1VrNShB9p6ai+V9ZILgklJKUQsCXoGWEAG8uX3X3URPasOAwo0VGMI8fUb Obe3j+iAYDoa14l1fBnQX2TB/s0CyUyNUHr4/VyUzOj0dhV3muEkBimbpgNYGrA/jeqSNjnlF zNODsA== X-Archives-Salt: 39083612-4be8-43b4-8319-588f9211e869 X-Archives-Hash: a25c4dd54335e34bfcbfa3b518d471a2 --vS+x+XCaPS1dz+lU Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 ther= e is > > no way around a little script which wraps mv by extracting the extensio= n and > > filename base. You could also add some =E2=80=9Cintelligence=E2=80=9D w= ith regards to > > directories, in order to reduce the amount of effort required to use the > > command=E2=80=94in case your directories follow some schema or are cons= tant. > > > > > > #!/usr/bin/sh > > > > [ "$#" -ne "2" ] && exit 1 > > SRC=3D"$1" > > DST=3D"$2" > > > > SRC_EXT=3D"${SRC##*.}" > > DST_BASE=3D"${DST%.*}" > > > > # remove destination for the case that the extensions differ > > rm "$DST" > > > > mv "$SRC" "${DST_BASE}${SRC_EXT}" > > >=20 > I finally got a chance to try this.=C2=A0 I saved it and made it executab= le.=C2=A0 > It runs but gave me this error.=C2=A0 >=20 >=20 > 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 $ >=20 >=20 > My scripting skills are minimal at best.=C2=A0 Still, I kinda got what yo= ur > script was doing.=C2=A0 Those who have known me for a while understand how > miraculous that is.=C2=A0 ROFL=C2=A0 I did some googling.=C2=A0 It seems = to not be able > to find the 'shebang' part.=C2=A0 Sure enough, sh isn't located in /usr/b= in > here.=C2=A0 It's in /bin tho.=C2=A0 I edited that line so it can find it.= =C2=A0 When I > tried it, it worked but noticed another problem. [=E2=80=A6] 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.=C2=A0 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=E2=80=99t find it right now. --=20 Gr=C3=BC=C3=9Fe | Greetings | Salut | Qapla=E2=80=99 Please do not share anything from, with or about me on any social network. The best thing about Sundays is Saturday evening. --vS+x+XCaPS1dz+lU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmN8n0UACgkQizG+tUDU MMpcfRAAhRDLWLx86hvbyPpxIcTAkgXL4co9WCmSlaONm/jpu8CVEQvcc2Ttoa6H 6vpWXh+lHFsdvcY6jKBqMWRW/NJCAaE/cg1hZo4H3GPVtKCz9qIl6k34hbdSpn7/ lABp45OFPi3xtEkZa6OR+WQgaf6VxeaOq9S5mcY3IQMNOcfGMLTznFce1zE1Lh/2 jg7WEBcphFVtqvzGd7uEoPVC+57eI3K5Zf+OzjFbq1FhGfZkaGKZMlzXvfroWvDP bQESx5Wg2/evZRB572DETVmqzWPtwtr2s3Bx/Z/OBR/UY+GZrHG5kYF7Cfxhwwwk Ybtze85X4YsGSVpjNd+X4VfHMDAIvHgbxsN7T1vBk2GYsZjpP/fuOdyOuOa1K+Xs w+VHXGSAo/IdvM+gPc0paj4vdSdOXfiGddzBKAkWpxQQvrUaw+zpnVh0dyN7x/8P 7bnZtlatfKF04AQAh8k2V3oUaGosviE/RzAj4aZqWRwLADx1gdXMQNX1iJ79VX6w WueHX3wT0PFX5t+udr567I6JTreumxLBboGTlvZLmkgMJQ8lqDCqtitgvFMcdgJa 3JBya2pegGffQbKeOnLoetyX3V6XlVuUNSpth+CYAFcUiJpUKeo8DAL80tOuJG+u SOq9g8E9Ki6n0Dcx3FaBOpwxzsVf4mb3LlN1ZGCojKx86CG3+MY= =Pdmx -----END PGP SIGNATURE----- --vS+x+XCaPS1dz+lU--