cmd.exe에 %^을(를) 입력하는 것이 Windows 이스터 에그인가요?

cmd.exe에 %^을(를) 입력하는 것이 Windows 이스터 에그인가요?

cmd를 입력 %^하고 눌렀 Enter더니 다음과 같이 나왔습니다.

More?

다시 눌러도 Enter똑같은 반응이 나오네요.

이것은 부활절 달걀인가요? 이게 뭔가요?

답변1

CMD는 라인 기반입니다. 한 번에 한 줄만 읽고 실행합니다. 입력하는 동안 한 줄을 끝내지 않으면 메시지가 표시됩니다 More?.

구체적인 점은 줄 끝이 없으므로 표지판 뒤에 무엇이 오는지 기다리고 있다는 것입니다 %.

대괄호를 사용하면 더 쉽게 볼 수 있습니다.

노력하다dir

그 다음에

(dir
echo %time%
(type c:\windows\win.ini
)
)

줄이 완성된 경우(대괄호 일치)에만 읽고 실행됩니다.

다음은 구두점 목록입니다.

&    separates commands on a line.

&&    executes this command only if previous command's errorlevel is 0.

||    (not used above) executes this command only if previous command's errorlevel is NOT 0

>    output to a file

>>    append output to a file

<    input from a file

|    output of one command into the input of another command

^    escapes any of the above, including itself, if needed to be passed to a program

"    parameters with spaces must be enclosed in quotes

+ used with copy to concatenate files. E.G. copy file1+file2 newfile

, used with copy to indicate missing parameters. This updates the files modified date. E.G. copy /b file1,,

%variablename% a inbuilt or user set environmental variable

!variablename! a user set environmental variable expanded at execution time, turned with SelLocal EnableDelayedExpansion command

%<number> (%1) the nth command line parameter passed to a batch file. %0 is the batch file's name.

%* (%*) the entire command line.

%<a letter> or %%<a letter> (%A or %%A) the variable in a for loop. Single % sign at command prompt and double % sign in a batch file.

\\ (\\servername\sharename\folder\file.ext) access files and folders via UNC naming.

: (win.ini:streamname) accesses an alternative steam. Also separates drive from rest of path.

. (win.ini) the LAST dot in a file path separates the name from extension

. (dir .\*.txt) the current directory

.. (cd ..) the parent directory


\\?\ (\\?\c:\windows\win.ini) When a file path is prefixed with \\?\ filename checks are turned off. 

< > : " / \ | Reserved characters. May not be used in filenames.



Reserved names. These refer to devices eg, 

copy con <filename> 

which copies a file to the console window.

CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, 

COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, 

LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9



Maximum path length              260 characters
Maximum path length (\\?\)      32,767 characters (approx - some rare characters use 2 characters of storage)
Maximum filename length        255 characters


.
--

답변2

아니요.

Microsoft는 2002년에 신뢰할 수 있는 컴퓨팅 이니셔티브의 일환으로 프로그램에 이스터 에그를 포함하는 것을 공식적으로 중단했습니다.
https://en.wikipedia.org/wiki/Easter_eggs_in_Microsoft_products

Microsoft의 Larry Osterman은 2005년 10월에 이스터 에그를 추가하는 것은 해고 사유가 된다고 언급했습니다.

요즘에는 Microsoft OS에 이스터 에그를 추가하면 즉각적인 종료 사유가 되므로 다른 이스터 에그를 볼 가능성은 거의 없습니다.
https://blogs.msdn.com/b/larryosterman/archive/2005/10/20/483110.aspx
또는:MSDN 블로그 아카이브

More?명령 프롬프트는 명령이 이스케이프 문자로 끝났기 때문에 명령의 연속( )을 찾고 있습니다 ^.

^ 이스케이프 문자를 사용하면 긴 명령을 여러 줄로 나누고 캐리지 리턴을 이스케이프하여 긴 명령을 더 읽기 쉽게 만들 수 있습니다.

답변3

정말 간단합니다. 다른 모든 답변과 의견(및 일부 입력)을 통해 제가 수집한 내용은 다음과 같습니다.

  • Microsoft는 부활절 달걀을 포함하지 않으며 이것도 포함되지 않습니다.
  • 입력해도 ^동일한 응답이 제공됩니다.
  • ^불완전한 명령을 완료하는 데 사용됩니다: [thanks @n00b]

    C:\windows\system32>net ^
    More? user
    
    User accounts for \\INFINITEPC
    
    -------------------------------------------------------------------------------
    Administrator            Guest                    Rahul
    The command completed successfully.
    

  • 따라서 기본적으로 입력 ip^하고 Enter 키를 누른 다음 입력하면 configcmd는 이를 ipconfig.
  • ^긴 명령을 더 읽기 쉽게 만드는 데 사용됩니다. [@Steven에게 감사드립니다]
  • cmd가 인간의 언어로 응답할 것이라고는 기대하지 않았기 때문에 이것이 이스터 에그라고 생각했습니다.

  • 관련 정보