Portmon telnet example
This is an example for using Telnet to get a process list.
# ('$' prompt must be escaped with '\')
# BE SURE TO NOT USE BLANK LINES UNLESS YOU REALLY
# WANT THEM TO BE USED;
USE COMMENTS INSTEAD
#
[WRITE LINE]
ps -ef
#
[READ UNTIL]
\$
#
[WRITE LINE]
exit
Note
When using characters of special significance to the operating system, ensure special care is taken (for example, testing for the next Command Prompt occurrence) using the [READ UNTIL] command. See the example below.
The On Screen or From File modes differ slightly. For both, single characters must be escaped. The From File mode also requires that the brackets [...] of a regular expression be escaped.
On screen
[READ UNTIL]
\$ (esc $); or \#, \%, \>
[$] (bracketed $)
[$#%>] (first occurrence of $, #, %, or >)
From File
[READ UNTIL}
\$ (esc $); or \#, \%, \>
\[ ... \] (escaped regular expressions as above)
Was this page helpful? Yes No
Submitting...
Thank you
Comments
Log in or register to comment.