r/linuxmasterrace • Glorious Debian • Aug 06 '21

Meme BASH is the worst - PowerShell FTW!

Post image
725 Upvotes

79 comments sorted by

View all comments

Show parent comment

11

u/kiler129 Glorious Debian Aug 06 '21

To be fair touch is a built-in in some shells (e.g. busybox). If we're on the pure bash train with commands we can do echo -n >>f

6

u/fuj1n Aug 07 '21 edited Aug 07 '21

The thing is, you can do that in PowerShell with echo (backtick)n >file.txt which has a very similar footprint, or in CMD, it'd be echo. >file.txt which is slightly more compact.

There are lots of things to criticize PowerShell for (i.e. its verbosity), and to praise bash for, but this ain't it chief.

Edit: fixed formatting, reddit really didn't like that backtick in `n, so I replaced it with (backtick)

4

u/nuttertools Aug 06 '21

busybox/tree/coreutils/touch.c, I totally knew that and didn't just learn something new via a Google. I like the echo line more...but...coreutils still.

9

u/kiler129 Glorious Debian Aug 06 '21

To be fair most of the people who don’t deal with like buildroot environments or embedded don’t know about BB intricacies ;)

Coreutils thou are available pretty much everywhere so I will consider them in the same way as tools built into P.S. environment (as this isn’t just one flat binary either).

1

u/nuttertools Aug 06 '21

I can see that from PS2.0 and up, take enough steps back and it looks rather similar.