Skip to content

Instantly share code, notes, and snippets.

@jjlumagbas
Last active December 13, 2016 00:59
Show Gist options
  • Save jjlumagbas/46f812448add61c514c2ac7dd40accdf to your computer and use it in GitHub Desktop.
Save jjlumagbas/46f812448add61c514c2ac7dd40accdf to your computer and use it in GitHub Desktop.
MP4 - Command Prompt sample input/output

Edit in interactive mode

Enter command edit

> edit hello.txt<Enter>
|                              # text editor is now open

add some text

> edit hello.txt<Enter>
Hello world<Enter>
<Enter>                        # that second enter exits text editor and saves file

verify text is in there

> show hello.txt<Enter>
Hello world

>

add more text

> edit hello.txt<Enter>
Hello world                    # contents of the file are displayed
|                              # text editor is open to append more text

type in some text

> edit hello.txt<Enter>
Hello world                    # contents of the file are displayed
Goodbye cruel world<Enter>     # adding more text
<Enter>                       

> show hello.txt<Enter>
Hello world
Goodbye cruel world

>
# ignore these comments, do not expect them in input file
edit hello.txt
Hello world
# this new line to exit text editor
show hello.txt # should print to file!
edit hello.txt
Goodbye cruel world
# this new line to exit text editor
show hello.txt # should print to file!
ls # should print to file!
edit bye.txt
Bye cruel world
# this new line to exit text editor
ls # should print to file!
mkdir src
ls # should print to file!
# ignore these comments, do not place them in output file
Hello world # 1st show
Hello world # 2nd show
Goodbye cruel world
hello.txt # 1st ls
hello.txt # 2nd ls
bye.txt
hello.txt # 3rd ls
bye.txt
src/ # note forward slash to denote folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment