| | |
splitting a ftp connection string to it's parts
![]() |
•
•
Join Date: Oct 2006
Posts: 1
Reputation:
Solved Threads: 0
Hello everybody,
I've got a small problem
I need the following string to be split into it's parts:
the result should be smth like:
Somebody has help for me?
Would be nice
Alternative I could also use a ftp shell enabled ftp client that "eats" the whole string (like old ncftp versions)
I can't use ncftpget / put because:
1. I want to delete files on the target server
2. The target server is a microsoft machine and doesnt work with with ncftput :mad:
kind regards
Michel
I've got a small problem
I need the following string to be split into it's parts:
Shell Scripting Syntax (Toggle Plain Text)
ftp://user:pass@host/path
Shell Scripting Syntax (Toggle Plain Text)
$USER = user $PASS = pass $HOST = host $PATH = path
Would be nice
Alternative I could also use a ftp shell enabled ftp client that "eats" the whole string (like old ncftp versions)
I can't use ncftpget / put because:
1. I want to delete files on the target server
2. The target server is a microsoft machine and doesnt work with with ncftput :mad:
kind regards
Michel
•
•
Join Date: May 2004
Posts: 178
Reputation:
Solved Threads: 10
Shell Scripting Syntax (Toggle Plain Text)
echo 'ftp://user:pass@host/path' | sed 's#[|:;>@/]# #g' | read dummy usr pwd hst pth # or echo 'ftp://user:pass@host/path' | tr -s '/' ' ' | tr -s ':' ' ' | tr -s '@' ' ' | read dummy usr pwd hst pth echo $pth echo $pwd echo $hst echo $usr
Last edited by jim mcnamara; Oct 24th, 2006 at 5:54 pm.
![]() |
Similar Threads
- connection string of SqlConnection (C#)
- Connection String (Visual Basic 4 / 5 / 6)
- Connection String (MS Access and FileMaker Pro)
- connection string (ASP.NET)
- Dynamic Connection String Using ADO (Visual Basic 4 / 5 / 6)
Other Threads in the Shell Scripting Forum
- Previous Thread: how to mount to serial port??wat is the command?
- Next Thread: query regarding the crontab command
| Thread Tools | Search this Thread |





