Jump to content
Sign in to follow this  
CSP

Removing newline from a file

Recommended Posts

CSP

Ouch.. I made a dupe by mistake..

How do I delete a post?

Edited by CSP

Share this post


Link to post
Share on other sites
CSP

lol dude that is not cool!

$temp = FileOpen("small.xml", 0)
$body = FileRead($temp)
FileClose($temp)
$body = StringReplace($body, "<", "{^}<")
$body = StringReplace($body, ">", "{^}>")
$body = StringReplace($body, "@LF", "")         
$body = StringReplace($body, "@CF", "")         
$body = StringReplace($body, "@CFLF", "")           
Send("echo "&$body&" > test.xml{ENTER}")

Does anyone know why newlines are not being removed?

I'm trying to read a local file and create a copy at a remote machine that's connected via telnet.

Unfortunately ftp and other options aren't available. Just me and my best friend telnet.

Edited by CSP

Share this post


Link to post
Share on other sites
CSP

Why of course...

I'll go shoot myself now.

Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×