To edit a file in the shell mode, you have to use an editor such as:
For a Windows gui, Winscp has its own editor.
To edit the file:
emacs file.txt vi file.txt pico file.txt
To save the file: