Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

"History is a tool used by politicians to justify their intentions." -- Ted Koppel


computers / comp.os.linux.misc / Re: automated way to fix unpadded numbering?

SubjectAuthor
* Re: automated way to fix unpadded numbering?Fritz Wuehler
`- Re: automated way to fix unpadded numbering?candycanearter07

1
Re: automated way to fix unpadded numbering?

<c41a934fefe84a6b61284990166f5c98@msgid.frell.theremailer.net>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=13643&group=comp.os.linux.misc#13643

  copy link   Newsgroups: comp.os.linux.misc
From: fritz@spamexpire-202309.rodent.frell.theremailer.net (Fritz Wuehler)
Subject: Re: automated way to fix unpadded numbering?
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
References: <udmg9p@dont-email.me>
Message-ID: <c41a934fefe84a6b61284990166f5c98@msgid.frell.theremailer.net>
Date: Tue, 12 Sep 2023 05:53:54 +0200
Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!gandalf.srv.welterde.de!news.karotte.org!news2.arglkargh.de!sewer!news.dizum.net!not-for-mail
Organization: dizum.com - The Internet Problem Provider
X-Abuse: abuse@dizum.com
Injection-Info: sewer.dizum.com - 2001::1/128
 by: Fritz Wuehler - Tue, 12 Sep 2023 03:53 UTC

candycanearter07 <no@thanks.net> [c]:
c> an automated way to [ pad the numbered files ]
c>
c> (converting 1.png, 2.png, 10.png to 001.png, 002.png, 010.png,
c> etc..)

printf(1) is your friend:

for i in *png;do x=$(printf "%03d.png" "${i/.png}");echo mv -v "$i" "$x";done

This command only demonstrates what will be done; remove 'echo' to
actually do it.

If you have like thousands of such files, the for loop above may fail
(the argument expansion will exceed some shell limit).
If that's the case, then use 'xargs(1)' or 'parallel(1)' instead.

Re: automated way to fix unpadded numbering?

<udop7h$1doia$2@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/computers/article-flat.php?id=13644&group=comp.os.linux.misc#13644

  copy link   Newsgroups: comp.os.linux.misc
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no@thanks.net (candycanearter07)
Newsgroups: comp.os.linux.misc
Subject: Re: automated way to fix unpadded numbering?
Date: Mon, 11 Sep 2023 23:25:20 -0500
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <udop7h$1doia$2@dont-email.me>
References: <udmg9p@dont-email.me>
<c41a934fefe84a6b61284990166f5c98@msgid.frell.theremailer.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 12 Sep 2023 04:25:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="13e36e5ab7041f2e4f1157c54b0dc146";
logging-data="1499722"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+jEvAxdAuoUj6Bu89EWuASEZGMMePkF8iTKQqP0kHvVA=="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:ZizRA187FcmfocpcAyOOxUxaRAw=
In-Reply-To: <c41a934fefe84a6b61284990166f5c98@msgid.frell.theremailer.net>
Content-Language: en-US
 by: candycanearter07 - Tue, 12 Sep 2023 04:25 UTC

On 9/11/23 22:53, Fritz Wuehler wrote:
> candycanearter07 <no@thanks.net> [c]:
> c> an automated way to [ pad the numbered files ]
> c>
> c> (converting 1.png, 2.png, 10.png to 001.png, 002.png, 010.png,
> c> etc..)
>
> printf(1) is your friend:
>
>
> for i in *png;do x=$(printf "%03d.png" "${i/.png}");echo mv -v "$i" "$x";done
>
>
> This command only demonstrates what will be done; remove 'echo' to
> actually do it.
>
> If you have like thousands of such files, the for loop above may fail
> (the argument expansion will exceed some shell limit).
> If that's the case, then use 'xargs(1)' or 'parallel(1)' instead.
>

Thanks

--
--
user <candycane> is generated from /dev/urandom

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor