April 29th, 2004

Using the echo command to remember what you were doing.

Sometimes you’ll start typing a complex command line and then realize that you can’t execute it now. Perhaps you’re in the wrong directory or you forgot to map the drive. It would be a shame to hit ESC and lose that command line. What I do is edit the line to insert the word “echo” in front, then hit Enter. (Note: This doesn’t work if you have command line redirection.)

This prints the command to the screen, where it can be cut/pasted later. Even more, it enters the line into the command history, so a few uparrows will bring it back.

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.