Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a \ and / in the same line

Status
Not open for further replies.

bmcken

Technical User
Oct 27, 2003
4
US
Hello....me again.

Thanks Knob for the previous help. I have new issue now.
I'm almost through the script but ran into another problem.

I'm trying to enter basic lines of text but I have 3 lines that have / and \ in them and procomm won't send the carriage return after the lines even if I try work around it. This is what I have so far:

transmit "add 6 `"NetworkSide`" firewall 1 pass incoming nolog Ping 10.168.1.2/32 \0.0.0.0/0"
pause 2
transmit "^M"
pause 1
transmit "add 6 `"NetworkSide`" firewall 2 pass incoming nolog Telnet 10.168.1.2/32 \0.0.0.0/0"
pause 2
transmit "^M"
pause 1
transmit "add 6 `"NetworkSide`" firewall 3 pass inout nolog protocol 0 0.0.0.0/0 \0.0.0.0/0"
pause 2
transmit "^M"

Can anyone point me in the right direction?
If not I can have the script upload these lines from a text file, but I didn't want to have to do that.

Thanks!

William McKenzie
TDS Metrocom - Lansing, MI
 
Does the system you are connecting to require a closing double quote in the command, which means you would need to add another `" (presumably at the end of the string you are trying to send)?


aspect@aspectscripting.com
 
No not really, the actual command if I were to type it on the console would be:
(Prompt would be: >)(response from console would be: OK)

>add 6 "NetworkSide" firewall 1 pass incoming nolog Ping 10.168.1.2/32 \0.0.0.0/0
OK
>add 6 "NetworkSide" firewall 2 pass incoming nolog Telnet 10.168.1.2/32 \0.0.0.0/0
OK
>add 6 `"NetworkSide`" firewall 3 pass inout nolog protocol 0 0.0.0.0/0 \0.0.0.0/0
OK


Does this help any?

Thanks again......


William McKenzie
TDS Metrocom - Lansing, MI
 
Do the transmit statements that contain the actual commands get transmitted and appear correctly? I'm thinking it must be something with either the \ or / being interpreted in a different manner, but am unable to verify that in the help file.


aspect@aspectscripting.com
 
I took your script and ran it while connected to another system, and the strings and carriage returns were sent as expected, so it doesn't look like it's an issue of Procomm interpreting the \ or / differently as I had presumed.


aspect@aspectscripting.com
 
When the commands are transmitted they appear to completely miss the carriage return and enter all 3 lines as one....therefore, the commands are not recognized and the equipment does not accept them.

I suppose I can upload those lines as a text file if there is no fix.

I appreciate your help though.

William McKenzie
TDS Metrocom - Lansing, MI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top