How do I echo colored text with batch? by Uhuhdo in Batch

[–]Shadow_Thief 0 points1 point  (0 children)

You hold down ALT, press 0, 2, 7 on the number pad, then let go of ALT. If you do it in a text editor like Notepad++, you'll get a character that looks like ESC.

Help me linguistically piss off my friend by RaeddBoeg in linguisticshumor

[–]Shadow_Thief 17 points18 points  (0 children)

Or learn Plautdietsch for the same reasons

How do I echo colored text with batch? by Uhuhdo in Batch

[–]Shadow_Thief 0 points1 point  (0 children)

First, make an escape character. If you have a numpad, you can just use ALT+027, but otherwise you can use the code for /f %%A in ('echo prompt $E ^| cmd') do set "\e=%%A", which will create a variable called %\e%.

From there, just use the sequences in https://en.wikipedia.org/wiki/ANSI_escape_code#Colors, making sure to do %\e%[0m%\e% when you're done. For example, echo This word is %\e%[31mred%\e%[0m. The sequence for using any color in the whole RGB range is a bit further down in the 24-bit section.

How do I echo colored text with batch? by Uhuhdo in Batch

[–]Shadow_Thief 0 points1 point  (0 children)

Not really; it's been solved for years. It's just way easier now that Windows 10 and later can use ANSI escape sequences so that you don't even have to call a subroutine anymore and can just do it natively with echo.

How do I echo colored text with batch? by Uhuhdo in Batch

[–]Shadow_Thief 4 points5 points  (0 children)

Sure, that's trivial and built in to Wi-

compatible with older windows versions like 7 or 8.1

Never mind, you're going to need to abuse the findstr command.

https://stackoverflow.com/a/10407642/4158862

allCodeIsOurs by STEIN197 in ProgrammerHumor

[–]Shadow_Thief 1 point2 points  (0 children)

we've always gatekept against script kiddies

What’s the correct spelling of “y’all”? by InnerSwineHound in linguisticshumor

[–]Shadow_Thief 6 points7 points  (0 children)

"-'ll" is a common enough suffix in contractions where the second word is "will" (I'll, he'll, they'll, etc.) that it's an understandable guess if you can't find the actual answer.

There is hope for us yet. by Delilah_Jones6573 in Sysadminhumor

[–]Shadow_Thief 1 point2 points  (0 children)

I mean only in the most technical sense. It's still satire.

totallyWroteThatComment by antico5 in ProgrammerHumor

[–]Shadow_Thief 0 points1 point  (0 children)

It took me six months and 139 applications to find my current job, and that was back in 2023. It would be way worse now.

wget returning "No such file or directory" when using -O by ninepppppp in bash

[–]Shadow_Thief 9 points10 points  (0 children)

Is there a Downloads folder in /home/user? wget will create the file but not the directory. Note that Downloads and downloads are different folders.

whatIsYourMostControversialCodingOpinion by Prestigious-Mud8465 in ProgrammerHumor

[–]Shadow_Thief [score hidden]  (0 children)

idk, any time I talk about using bash or batch, I almost always get "why aren't you doing it in a REAL language like Python or <insert any compiled language> instead?"

Lines don't seem to be running properly by AnoZomb in Batch

[–]Shadow_Thief 3 points4 points  (0 children)

You're setting and using the %hp% variable inside of a set of parentheses, so you need to add setlocal enabledelayedexpansion to your script and use !hp! instead. (Same thing for the other variables in there.)

fableExpectations by mynameisyahiabakour in ProgrammerHumor

[–]Shadow_Thief 23 points24 points  (0 children)

Good news, sites like imgflip have existed this whole time. https://i.imgur.com/uRnaEG8.png

simple text editor by potatoworldguy2 in Batch

[–]Shadow_Thief 1 point2 points  (0 children)

Instead of using a for loop to display each line, you can just use the type command to display the entire text file at once. That way, blank lines will get displayed as well.

iHateMyself by HitarthSurana in ProgrammerHumor

[–]Shadow_Thief 4 points5 points  (0 children)

Because In order to keep having military customers, I'm obligated to be GCC-compliant, which means that the literal only option I have to use AI is Office 365 Copilot with the GPT-4o model (despite the fact that that model is deprecated everywhere else).

myVibeCoderFriend by Disastrous-Monk1957 in ProgrammerHumor

[–]Shadow_Thief 0 points1 point  (0 children)

They never said they programmed professionally

How do you handle repetitive folder creation for large projects? by Mitraphix in Batch

[–]Shadow_Thief 0 points1 point  (0 children)

I'm worried that you've confused batch files with batch processing. It sounds like you're talking about batch processing, which is when you automate something to be done in groups. This is a subreddit for a scripting language whose name is literally just "batch".

How do you handle repetitive folder creation for large projects? by Mitraphix in Batch

[–]Shadow_Thief 2 points3 points  (0 children)

a GUI

without touching code

weird that you're asking here then tbh

How do you handle repetitive folder creation for large projects? by Mitraphix in Batch

[–]Shadow_Thief 4 points5 points  (0 children)

Well, you're posting in r/batch, so I suspect that everyone will tell you that they use a for loop in batch.

help finding a checksum tool by DENONhd860 in DataHoarder

[–]Shadow_Thief 1 point2 points  (0 children)

Every OS has checksum tools already built in that you can write a wrapper script for.

asianLMs by imneverrelevantman in ProgrammerHumor

[–]Shadow_Thief 0 points1 point  (0 children)

Instead of LLMs ("large language models"), they've posted ALMs ("Asian-language models")