Reputation: 2921
Once I had a file, to see the contents I used cat command, say cat filename, its content was displayed on the terminal, also automatically it typed some random characters on my terminal and enter
key also got typed and then terminal prompted command not found
.
I was wondering whether it is possible to write commands in file and executing those commands using cat command.
I am not able to get that file again and also searching is not helpful. But I am sure some one over here must know this.
Upvotes: 1
Views: 1702
Reputation: 61369
This sounds like a file which had escape sequences that caused the terminal to read the following string as input. These days that capability tends to not be supported by terminal programs because it's a fairly obvious security issue.
One way this used to be doable was by programming the DEC "answerback" sequence, which the terminal would transmit in response to a Ctrl+E embedded in the file.
Upvotes: 3