Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
C0D4681453yThat's powershell, it's not a terminal.
You want to PS variant of this.
@highlight
$hello = "Hello World"
$hello | Out-File c:\file.txt -
Sorry to call you out but this is a pretty rookie mistake lol
Youre confusing terminal emulators and shells.
On the new emulator, you're using PowerShell. On the other, you're using CMD.
Different syntaxes and capabilities.
You can run CMD in Windows Terminal too. Or PowerShell. Or even Bash. It's just a terminal emulator. It handles rendering character cells on the screen and input events -
@AlgoRythm
Oh yes. That was the purpose.
The “terminal” is a PowerShell. Mostly. But it adds a bit of things like SSH being installed and usable by default. It does some aliases for commands also.
CMD is “our old dos era thing”. But I’m just surprised that it still works.
And if you have any articles to how manage alternate stream in PowerShell. I will take it. -
C0D4681453y@NoToJavaScript if you install Debian or Ubuntu for WSL then you can use the terminal for Linux commands as you would anything* Linux based.
Setup a profile with command line:
Cmd.exe echo debian
And launch the debian shell for WSL
* granted MS doesn't get in the way or your use case isn't a bit adventurous.
Personally I just use MobaXterm and have Cygwin and Git Bash installed to leverage typically unix commands inside windows, or connect to *nix boxes if required. -
@NoToJavaScript No, the terminal and powershell are unrelated programs.
Anyway, the syntax for accessing ADS with powershell is:
Get-Content -Path .\hello.txt -Stream streamname
(of course use Set-Content for writing)
OMG. Talking about NTFS in this rant :
https://devrant.com/rants/4449565/...
Made me think. Does the lastest version of Terminal on Windows supports that ? Does last cmd ?
LOL !!! the BEST terminal Microsoft ever made... Does not suport alternate streams in this test. (may be it's other syntax, no iea).
But cmd still does. The old cmd I never used since this terminal app was released.
I find it super funny.
rant