Edit a text file on the console using Powershell

Solution 1:

Why not use notepad?

notepad.exe filename.txt

The old edit.com works in PowerShell (at least on my box: Windows 7 Pro x86) but in x64 it doesn't work due to its 16bit architecture.

You can take a look at this easy editor.

Solution 2:

Kinesics Text Editor.

It's super fast and handles large text files, though minimal in features. There's a GUI version and console version (k.exe) included. Should work the same on linux.

Example: In my test it took 7 seconds to open a 500mb disk image.

screenshot

Solution 3:

While risking you punching me, I guess you are stuck with the solution you mentioned. Have a look at this posting on SuperUser:

Which are the non-x text editors in Powershell?

Also, there is a nano version for windows:

Nano Editor

I'll duck and cover now, hopefully someone will have a more sufficient answer.