It is also possible to create a file with TCL scripting:
Router#tclsh
Router(tcl)#puts [open "flash:test" w+] {
+>This is a test.
+>Line 2.
+>Third line.
+>}
Router(tcl)#tclquit
Router#more flash:test
This is a test.
Line 2.
Third line.
I'm not a TCL expert, but I think editing is also possible by using the a+ (append) open flag instead of w+, and append instead of puts.
With Cisco IOS, you've got the more command, like on Linux, which you can use to print the content of a file.
The more command shows a text file. This command works just like it does in Linux—it allows youto view a file on a disk. In the case of the Cisco IOS, you can use this command to view a text file, such as your configuration file or a saved backup configuration file. Here's an example:
It is also possible to create a file with TCL scripting:
I'm not a TCL expert, but I think editing is also possible by using the
a+
(append) open flag instead ofw+
, andappend
instead ofputs
.With Cisco IOS, you've got the more command, like on Linux, which you can use to print the content of a file.