Illegal command
Jump to navigation
Jump to search
Illegal command is a esolang created by User:Qazwsxplm, inspired by 'xxx' is not recognized as an internal or external command, operable program or batch file. and it imitates a common DOSBox error when you attempt to execute a command that does not exist.
Commands
Any command will be valid and prints:
Illegal command: (command name).
Commands are separated by line feeds.
Interpreter
Python
[print("Illegal command: '{}'.".format(x)) for x in __import__('sys').stdin.read().split('\n')]
C
The program implements a REPL, and uses the insecure function gets to read the program.
#include<stdio.h>
char _[1000000];
int main()
{
while(!feof(stdin))
{
printf("C:\\>");
gets(_);
printf("Illegal command: '%s'.\n",_);
}
}
Batch
@echo off :bad set /p x=C:\^> echo Illegal command: '%x%'. echo. goto bad