I need to open a file named -
. (I am playing this hacker game)
And when I try to use command cat -- -
, after I type that, any command I type does not work, for that fact, everything I type just repeats itself after I hit enter.
I assume I entered into some type of loop or extended command mode or something.
What do I type, or press to get out of this "loop" ?
Just to be clear, I typed "hhel" once, and it showed up twice, I typed "test" once, and as you can see in the photo, it showed up twice in the terminal.
cat
that reads from and writes to the terminal, not the shell – ilkkachu Dec 08 '22 at 21:22Terminal won't execute any command
is absolutely wrong. The terminal can't run commands. Only the shell parses and runs commands – phuclv Dec 09 '22 at 04:33cat
is incapable of opening a file named by an argument-
, because it is hard-coded to treat an argument of-
as a synonym for standard input. Using--
doesn't do anything, because-
isn't treated as an option in the first place.cat -- -
is exactly the same ascat -
. – chepner Dec 09 '22 at 19:58