Post AoDTCRGbUwXB98G97A by tomw@mastodon.social
(DIR) More posts by tomw@mastodon.social
(DIR) Post #AoDRhDCrclASbk3Xou by foone@digipres.club
2024-11-19T23:28:57Z
0 likes, 0 repeats
there's a certain level of sadness you have to reach to learn how to do a for-loop in batch scriptingbash? sure, that's normal. but if you want to iterate over some files on a windows command line? you're a sicko
(DIR) Post #AoDRkMy5mpoNkgeW0W by foone@digipres.club
2024-11-19T23:29:05Z
0 likes, 0 repeats
I am, sadly, a sicko
(DIR) Post #AoDRrlpRkocqsn8aky by VeNT@mastodon.online
2024-11-19T23:30:51Z
0 likes, 0 repeats
@foone thank god for powershell.
(DIR) Post #AoDRyO4AV815DBB8cq by kajer@infosec.exchange
2024-11-19T23:32:02Z
0 likes, 0 repeats
@foone ha ha yes
(DIR) Post #AoDS4AJoWlFUJNFgiO by Ongion@mendeddrum.org
2024-11-19T23:33:05Z
0 likes, 0 repeats
@foone whenever I get to that point I think about just learning powershell instead.I assume that's not an option for the environment you're operating in, though.
(DIR) Post #AoDS9ElfPe6NYghMiu by m@autistics.life
2024-11-19T23:34:04Z
0 likes, 0 repeats
@foone I mean, I've never *wanted* to... but yeah, I've written that code more times than I'd like to admit.
(DIR) Post #AoDST62ZZQ40Hb4kTo by foone@digipres.club
2024-11-19T23:37:41Z
0 likes, 0 repeats
@Ongion powershell is an option, but I'd rather learn more batch than powershell. more universally usable in the circles I live in
(DIR) Post #AoDSwAo2vkkrSf96em by mcc@mastodon.social
2024-11-19T23:42:50Z
0 likes, 0 repeats
@foone the point where I think cursed thoughts like "I should switch over to MSBuild, where things are easier"
(DIR) Post #AoDT6iwqqWOSFMINBA by irina@eldritch.cafe
2024-11-19T23:44:47Z
0 likes, 0 repeats
@foone i've gotten to this point a few times and just decided "hm. no, the user can install python for this"
(DIR) Post #AoDT9kBAj3xcvvQwxk by funkylab@mastodon.social
2024-11-19T23:44:31Z
0 likes, 0 repeats
@foone so you do that recursively?
(DIR) Post #AoDTCRGbUwXB98G97A by tomw@mastodon.social
2024-11-19T23:44:51Z
0 likes, 0 repeats
@foone My batch is still way better than my bash – learned it in DOS as an actual child. This turns out to be a less universal experience than I once assumed
(DIR) Post #AoDTWEcKEryHhorJp2 by foone@digipres.club
2024-11-19T23:49:23Z
0 likes, 0 repeats
@funkylab yeah I'm a recursive sicko
(DIR) Post #AoDTZRgo5onZ7LUCw4 by foone@digipres.club
2024-11-19T23:49:52Z
0 likes, 0 repeats
@irina yeah that's my usual option. I can write a 5 line python program that does what a 2 line batch program can do, but at least I'll understand it
(DIR) Post #AoDTc3W6QGUf13iwk4 by foone@digipres.club
2024-11-19T23:50:17Z
0 likes, 0 repeats
@mcc AHHHHHHHHHHHHHHH MSBUILD one of my previous jobs involved automating MSBuild and it was an endless nightmare
(DIR) Post #AoDTki8xG23NKm1XiS by mcc@mastodon.social
2024-11-19T23:51:58Z
0 likes, 0 repeats
@foone i have become comfortable with it , like a horrible cursed glove. i have created works of startling complexity in it. msbuild is the thing that means I don't have to learn how to learn batch
(DIR) Post #AoDTw2yI9yEb7HRSCG by pino@social.cologne
2024-11-19T23:54:03Z
0 likes, 0 repeats
@foone I never did in batch files, but in bash it is definitely too weird for me. I would never write any bash script with a for loop if it could be something else.
(DIR) Post #AoDUEm810SrGNdv72W by catsalad@infosec.exchange
2024-11-19T23:57:26Z
0 likes, 0 repeats
@foone Me too (though I main Linux now). I don't know if you remember this old site, but it's still around and has some many weird batch / cmd file tricks there.https://www.robvanderwoude.com/battech.php#Flow
(DIR) Post #AoDUKTBQMAKbMREJrU by funkylab@mastodon.social
2024-11-19T23:58:29Z
0 likes, 0 repeats
@foone well I'm not one to stackshame anyone
(DIR) Post #AoDUNDnE29a0UuDuNs by leo@60228.dev
2024-11-19T23:58:59Z
0 likes, 0 repeats
@foone @mcc did you know that nintendo uses msbuild for building switch games
(DIR) Post #AoDUwwqKWxB4LxiAF6 by foone@digipres.club
2024-11-20T00:05:24Z
0 likes, 0 repeats
@leo @mcc AHHHHHHHHHHHHHH
(DIR) Post #AoDV9cAghMtY0QH0SW by f4grx@chaos.social
2024-11-20T00:07:45Z
0 likes, 0 repeats
@foone the bat for command has surprisingly wide capabilities.
(DIR) Post #AoDVOnZMbSl7hS3V44 by curtmack@floss.social
2024-11-20T00:09:54Z
0 likes, 0 repeats
@mcc @foone When I worked at IBM, I briefly had a local instance of IBM WebSphere on my work laptop. At that time, the entire build system comprised hundreds of batch scripts calling each other, and documentation was non-existent. It took me two full days of fiddling to get it built, between the raw build time and having to modify the process on the fly because our environment was not exactly the same as that of the team that originally produced it.
(DIR) Post #AoDVOp7moxt8WVAVMG by foone@digipres.club
2024-11-20T00:10:28Z
0 likes, 0 repeats
@curtmack @mcc nasty!
(DIR) Post #AoDVhVPCMPsarqDlGi by FritzAdalis@infosec.exchange
2024-11-20T00:13:51Z
0 likes, 0 repeats
@foone @catsalad I've done obscene and disturbing things with batch files and I'm proud of it. FOR /F forever!
(DIR) Post #AoDY4T53N1xME2sKvo by mose@infosec.exchange
2024-11-20T00:40:20Z
0 likes, 0 repeats
@foone I literally had a conversation a few hours ago about how I always forget bash for loop syntax because I'm so used to the Windows command shell way of doing it.
(DIR) Post #AoDea5IlujkjT7kdW4 by eltonfc@bertha.social
2024-11-20T01:53:21Z
0 likes, 0 repeats
@foone is it even possible without a goto?
(DIR) Post #AoDksd8jRXFzLxHWc4 by SvenGeier@mathstodon.xyz
2024-11-20T03:03:50Z
0 likes, 0 repeats
@foone That's what I learned TCL for, back in the nineties. It still works everywhere and I don't need to worry what this week's shell thinks is the right way to do things. 𝚏𝚘𝚛𝚎𝚊𝚌𝚑 𝚒 [𝚐𝚕𝚘𝚋 $𝚏𝚒𝚕𝚎𝚜𝚙𝚎𝚌] { 𝚍𝚘 𝚜𝚘𝚖𝚎𝚝𝚑𝚒𝚗𝚐 𝚑𝚎𝚛𝚎 }is the same everywhere...
(DIR) Post #AoDxiuvzj9rH3B1T28 by epu@mstdn.social
2024-11-20T05:27:49Z
0 likes, 0 repeats
@foone i would just like to point out that strawberry perl ships with a working msys compiler and between that and git for windows coming with native bash, you can try to build things terribly/build terrible things
(DIR) Post #AoDyU8RlJ3RQZJOfQ0 by foone@digipres.club
2024-11-20T05:36:22Z
0 likes, 0 repeats
@eltonfc yeah! There's a "for" statement which iterates over a list and does some variable replacement stuff per iteration.for /l %%x in (1, 1, 100) do echo %%x
(DIR) Post #AoDzsS6XyEXIRMdIOW by barubary@infosec.exchange
2024-11-20T05:51:56Z
0 likes, 0 repeats
@foone IIRC the batch for command isn't a loop in the usual sense. It first builds a list of input strings (in various ways, depending on how you invoke for), then uses the "loop body" as a template string to replicate and substitute the current input string into (mail merge style). Finally, it takes the "loop bodies" with input values interpolated into them, concatenates them all, and evals the result.This has certain implications for performance, loop control, and the way regular %variables% work in these "loops".
(DIR) Post #AoES8mKtJeNEXKupJw by gunstick@mastodon.opencloud.lu
2024-11-20T11:08:30Z
0 likes, 0 repeats
@fooneinstall wslwrite bash which generates .BATrun .BAT
(DIR) Post #AoEWoUoNGGfCAGr01g by edd@freeradical.zone
2024-11-20T12:00:57Z
0 likes, 0 repeats
@foone This brings back bad memories... I wrote a script for my friends with Windows boxes to rip music off an iPod and spent way too long wondering why the for loop wasn't working before I saw the obscene stipulations.Pretty sure that cemented my feelings on Windows.
(DIR) Post #AoEyD8WjwtTx3Ka048 by GroupNebula563@mastodon.social
2024-11-20T17:07:48Z
0 likes, 0 repeats
@foone I have to do this on XP as well. I don't think I have any sanity left, to be fully honest
(DIR) Post #AoFU3NS0nyQ8yWl4zY by foone@digipres.club
2024-11-20T23:04:43Z
0 likes, 0 repeats
@barubary given everything I know about Microsoft, that doesn't surprise me in the slightest
(DIR) Post #AoFmKy0pvAbyT1aHrM by stylus@social.afront.org
2024-11-21T02:29:40Z
0 likes, 0 repeats
@foone and with that I realize that all knowledge of writing .BAT files has gone from my brain. except maybe for @echo off.