Need Help on Download Script

despdan

Inactive User
Joined
Nov 19, 2007
Messages
529
Reaction score
19
Location
Ireland
Is this poss? i want to download a file & replace part of a line with a line from the file downloaded?

eg: replace 1234567890abcdef in the file with the line 1234567890abcdef & load of writing.

with abcdef0987654321 so the line reads:

abcdef0987654321 & a load of writing.

what i have is:
Code:
You don't have permission to view the code content. Log in or register now.
 
Last edited:
Sed is great program for doing things like that. Something like this might work :

Code:
You don't have permission to view the code content. Log in or register now.
 
Last edited:
Sed is great program for doing things like that. Something like this might work :

Code:
You don't have permission to view the code content. Log in or register now.

Thanks M8
what i can't figure out is getting the abcdef0987654321 out of the downloaded file into the file, if you know what i mean:)
 
I think I understand more now...here's another code snippet :)

Code:
You don't have permission to view the code content. Log in or register now.

The "*$" is important. It selects everything from abcdef0987654321 to the end of the line
 
Code:
You don't have permission to view the code content. Log in or register now.
Ok that takes abcdef0987654321 from the downloaded file & sets it as "line" variable.
What if you don't know the contents of the downloaded file but you know you need the contents & where to put them?

Code:
You don't have permission to view the code content. Log in or register now.
Ok my understanding of this line is s=substitute abcdef0987654321 in the oldfile with variable "line" in file called oldfile, am i correct?
 
What if you don't know the contents of the downloaded file but you know you need the contents & where to put them?

You're being waaay too vague ;)


Ok my understanding of this line is s=substitute abcdef0987654321 in the oldfile with variable "line" in file called oldfile, am i correct?

It would substitute the line containing abcdef0987654321 with the variable "line"
 
OK this is what i'm attempting to do:

Plugin for dreambox thru yellow button that will download a file with the latest ip address.

So say in dreambox the cline is
Code:
You don't have permission to view the code content. Log in or register now.
That now has to be changed to
Code:
You don't have permission to view the code content. Log in or register now.

So all that would be in the downloaded file would be
Code:
You don't have permission to view the code content. Log in or register now.
but the other dreambox would never know the contents of that file & the download file wouldn't know the full contents of the target file.

I know there is dyndns but i want to do it myself & learn a bit as I go:Dunce::thankz:
 
Back
Top