--- Log opened Mon Mar 08 00:00:58 2021 |
01:02 | | catalyst [catalyst@Nightstar-erj7mf.dab.02.net] has quit [Ping timeout: 121 seconds] |
01:12 | | catalyst [catalyst@Nightstar-erj7mf.dab.02.net] has joined #code |
01:13 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Connection closed] |
01:31 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has joined #code |
01:31 | | mode/#code [+o himi] by ChanServ |
03:05 | | Degi [Degi@Nightstar-kn6huh.pool.telefonica.de] has quit [Operation timed out] |
03:07 | | Degi [Degi@Nightstar-gq56oc.pool.telefonica.de] has joined #code |
05:22 | | VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has quit [Connection closed] |
05:22 | | VirusJTG [VirusJTG@Nightstar-42s.jso.104.208.IP] has joined #code |
05:22 | | mode/#code [+ao VirusJTG VirusJTG] by ChanServ |
05:35 | < Yossarian> | mv isn't a very good batch renaming tool if your console-fu is weak, is it? |
05:36 | < Mahal> | git gud |
05:36 | <&McMartin> | git: 'gud' is not a git command. See 'git --help'. |
05:37 | <&McMartin> | The most similar command is: add |
05:38 | < Yossarian> | Screenshots from W10. They start off "Screenshot (1).png" and I took screenshots almost into 4 digits. So it goes Screenshot (100).png, Screenshot (1000).png. |
05:39 | <&McMartin> | Interesting. Explorer usually sorts numbers, er, numerically, which can produce exciting effects when they weren't supposed to represent quantities. |
05:52 | | catalyst [catalyst@Nightstar-erj7mf.dab.02.net] has quit [Ping timeout: 121 seconds] |
06:08 | < Yossarian> | literally scratching my head, doesn't bash have word designators or something? |
06:10 | | catalyst [catalyst@Nightstar-ehh8ru.dab.02.net] has joined #code |
06:10 | <&McMartin> | Kiiiinda, but you have to messa round with backreferences and stuff? |
06:11 | <&McMartin> | Like, "change every .txt file to .blah instead" is really hard to do with a single command and you're way better off with a for loop |
06:14 | < Yossarian> | ls | sed | xargs -n2 mv maybe |
06:18 | < Yossarian> | need more coffee |
06:18 | <&McMartin> | Nah, for is easier than that |
06:33 | < Yossarian> | The first minute or three is what my brain feels like right now: https://www.youtube.com/watch?v=51oPKLSuyQY Yes - Close to the Edge - Close to the Edge |
06:41 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has joined #code |
06:41 | | mode/#code [+qo Vorntastic Vorntastic] by ChanServ |
07:32 | | celticminstrel is now known as celmin|sleep |
08:34 | < Alek> | I mean. |
08:34 | < Alek> | no support for |
08:34 | < Alek> | rename *.txt *.blah |
08:34 | < Alek> | ??? |
08:42 | | Kindamoody[zZz] is now known as Kindamoody|afk |
08:46 | | catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
08:49 | | catalyst [catalyst@Nightstar-ehh8ru.dab.02.net] has quit [Ping timeout: 121 seconds] |
09:58 | < Yossarian> | Alek: I could use `rename` or `perl rename` I guess. |
09:59 | < Yossarian> | It's not a mission critical task, it's me using crappy Reddit to talk to other weebs about a particular on-going season and some mystery. Some screenshots of either important plot points or terrible continutity errors. |
11:33 | | catalyst [catalyst@Nightstar-ehh8ru.dab.02.net] has joined #code |
11:37 | | catalyst_ [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Ping timeout: 121 seconds] |
12:13 | <&[R]> | Yossarian: for n in 1 100 1000; do name="Screenshot (${n}).png"; x="${name%%)*}"; echo "${x##*(}" ;done |
12:18 | | catalyst_ [catalyst@Nightstar-3mv07q.dab.02.net] has joined #code |
12:19 | | abudhabi_ [abudhabi@Nightstar-bftss4.adsl.tpnet.pl] has joined #code |
12:20 | <&[R]> | for n in 1 100 1000; do name="Screenshot (${n}).png"; x="${name%%)*}"; x="${x##*(}"; newname="$(printf 'screenshot.%08d.png' ${x})"; echo mv "${name}" "${newname}"; done |
12:20 | <&[R]> | ^ more complete example |
12:21 | <&ToxicFrog> | McMartin: re "change every .txt file to .blah": this is what rename(1) is for: rename .txt .blah *.txt |
12:22 | | catalyst [catalyst@Nightstar-ehh8ru.dab.02.net] has quit [Ping timeout: 121 seconds] |
12:23 | <&ToxicFrog> | [R]: that'll skip over 2, 3, 4... and 11, 12, 13... |
12:23 | | abudhabi [abudhabi@Nightstar-4smb6h.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds] |
12:23 | <&[R]> | ToxicFrog: I don't actually have a directory with files named like that |
12:23 | <&[R]> | That was a demo |
12:23 | <&ToxicFrog> | I would probably do it as: |
12:23 | <&ToxicFrog> | for n in {1..999}; do mv "Screenshot ($n).png" "Screenshot ($(printf '%04d' $n)).png"; done |
12:24 | <&[R]> | A proper solution would remove the first name= assignment and do `for name in Screenshot*` |
13:43 | | Kindamoody|afk is now known as Kindamoody |
14:36 | | celmin|sleep is now known as celmin|busy |
14:56 | | Vornicus [Vorn@ServerAdministrator.Nightstar.Net] has joined #code |
14:56 | | mode/#code [+qo Vornicus Vornicus] by ChanServ |
15:31 | | Vorntastic [uid293981@Nightstar-h2b233.irccloud.com] has quit [[NS] Quit: Connection closed for inactivity] |
16:01 | | abudhabi_ [abudhabi@Nightstar-bftss4.adsl.tpnet.pl] has quit [The TLS connection was non-properly terminated.] |
16:09 | | abudhabi [abudhabi@Nightstar-bftss4.adsl.tpnet.pl] has joined #code |
16:19 | <&[R]> | So I'm working on a build script that compiles something |
16:19 | <&[R]> | Before I call make, config.h has: |
16:19 | <&[R]> | #define REQUIRE_SSH_AGENT |
16:19 | <&[R]> | #undef REQUIRE_SSH_AGENT |
16:19 | <&[R]> | Yet in a file with a `#ifdef REQUIRE_SSH_AGENT` check, that check gets compiled in |
16:20 | <&[R]> | Did I not #undef correctly? |
16:20 | <&[R]> | (Note: the build process unpacks a fresh tarball, and I'm appending the #undef line) |
16:24 | < Yossarian> | sorry, I was tuned into something else |
16:26 | | catalyst_ is now known as catalyst |
16:26 | < Yossarian> | <&ToxicFrog> for n in {1..999}; do mv "Screenshot ($n).png" "Screenshot ($(printf '%04d' $n)).png"; done -- celmin|sleep is now known as celmin|busy |
16:27 | <&[R]> | That'll over-write things if you write more screenshots |
16:27 | < Yossarian> | wouldn't a `for f in *.png` work, too? |
16:27 | <&[R]> | Actually, I guess my solution will too |
16:27 | <&[R]> | Hmm |
16:27 | < Yossarian> | I just bought a math book when apparently I should have bought a shell script book |
16:27 | < Yossarian> | lol |
16:30 | < Yossarian> | I ended up doing manual work instead because something came up and wasn't paying attention; need a better visual alert |
16:30 | <&[R]> | (RE: my issue, I had another copy of the thing in my PATH) |
16:31 | < Yossarian> | config.h ? |
16:32 | < Yossarian> | oh |
16:59 | | Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has joined #code |
18:32 | <@celmin|busy> | Thanks for the ping… :| |
18:51 | | catalyst_ [catalyst@Nightstar-l64lvj.dab.02.net] has joined #code |
18:52 | | catalyst [catalyst@Nightstar-3mv07q.dab.02.net] has quit [Ping timeout: 121 seconds] |
19:29 | | catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has joined #code |
19:32 | | catalyst_ [catalyst@Nightstar-l64lvj.dab.02.net] has quit [Connection closed] |
20:24 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
20:24 | | mode/#code [+o Reiv] by ChanServ |
20:52 | | himi [sjjf@Nightstar-v37cpe.internode.on.net] has quit [Ping timeout: 121 seconds] |
21:25 | | macdjord|slep [macdjord@Nightstar-re5.7if.45.45.IP] has joined #code |
21:25 | | mode/#code [+o macdjord|slep] by ChanServ |
21:26 | | celmin|busy [celticminst@Nightstar-rh8g14.dsl.bell.ca] has quit [Operation timed out] |
21:27 | | mac [macdjord@Nightstar-re5.7if.45.45.IP] has quit [Ping timeout: 121 seconds] |
22:30 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
22:31 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
22:31 | | mode/#code [+o Reiv] by ChanServ |
23:12 | | himi [sjjf@Nightstar-1drtbs.anu.edu.au] has joined #code |
23:12 | | mode/#code [+o himi] by ChanServ |
23:21 | | Kindamoody is now known as Kindamoody[zZz] |
23:25 | | Emmy [Emmy@Nightstar-l49opt.fixed.kpn.net] has quit [Ping timeout: 121 seconds] |
23:33 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has quit [[NS] Quit: http://www.kiwiirc.com/ - A hand crafted IRC client] |
23:35 | | Reiv [NSkiwiirc@Nightstar-ih0uis.global-gateway.net.nz] has joined #code |
23:35 | | mode/#code [+o Reiv] by ChanServ |
23:41 | | catalyst [catalyst@Nightstar-ejd4sd.cable.virginm.net] has quit [Connection closed] |
--- Log closed Tue Mar 09 00:00:59 2021 |