I followed all the correct steps and I'm still getting a "Invalid argument" error. Here the steps:
Manually install ed from here: https://gnuwin32.sourceforge.net/packages/ed.htm. Setup file is the ones that says "Complete package, except sources".
Adding the path (C:\Program Files (x86)\GnuWin32\bin) to the PATH system variable (tried with local variables too).
Tried running this command from Command Prompt and Powershell with elevated privileges:
"C:\Program Files (x86)\GnuWin32\bin\ed.exe" "{full-path-to-some-file.txt}"
I invariably get an "Invalid argument" error.
If I try to run just "ed", I get the same.
But if I type "ed --version" I get:
GNU Ed 1.2 Copyright (C) 1994 Andrew L. Moore, 2009 Antonio Diaz Diaz. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
And I type "ed --help" I get:
GNU Ed - The GNU line editor.
Usage: ed [options] [file] Options: -h, --help display this help and exit -V, --version output version information and exit -G, --traditional run in compatibility mode -l, --loose-exit-status exit with 0 status even if a command fails -p, --prompt=STRING use STRING as an interactive prompt -s, --quiet, --silent suppress diagnostics -T, --textmode input and output in textmode (EOL = CRLF) -v, --verbose be verbose Start edit by reading in
file' if given. Read output of shell command if
file' begins with a `!'.Report bugs to bug-ed@gnu.org. Ed home page: http://www.gnu.org/software/ed/ed.html General help using GNU software: http://www.gnu.org/gethelp
So it seems to me that is correctly installed, but I still can't use it? I'm so confused.