title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
x
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
|
Wednesday, January 11, 2023 | |
Remember when I said this?
What a naรฏve time that was. Take this seemingly innocuous question on SO:
And then check this answer:
Wha? Luckily (?) one of the commenters asked the same question.
I mean, um, that requires Inception level cognition to understand. ๐ (Okay, actually it's pretty straightforward, but talk about a lack of discoverability.) What's even more interesting is that dev's answer to the original question, which is this:
AsideOkay, before I point out what I want to point out, note that From ss64.com, a common domain when I'm in batchland:
And we're backOkay, now what I'd like to point out here is the Here's some explanation from ss64.com:
EnableDelayedExpansion ย command.Variable expansion means replacing a variable (e.g.ย
And here's a decent example from that page showing how it works in practice.
The output is
Note that the above example has to be in a batch file to work properly. Anyhow, it's an insane rabbit hole that I didn't schedule for this sprint and fell into anyhow. I'm going to cut my losses now that I've warned others who may have been as naรฏve about batch scripts as I was, oh so long (less than three weeks ๐) ago. Oh good heavens. I guess this makes sense. The first example can be taken by itself as a brain teaser, I think. From ss64.com, again on EnableDelayedExpansion: @echo off Setlocal Set _html=Hello^>World Echo %_html% Got that figured out? If not, sit and think about it for a second before reading more. Got it? Good. Clever, huh?
Labels: batch, cmd, development, noteToSelf posted by ruffin at 1/11/2023 12:27:00 PM |
|
| |
All posts can be accessed here: Just the last year o' posts: |
||||||||||||||||||||||
|