Hello everybody,

I've got a small problem
I need the following string to be split into it's parts:

ftp://user:pass@host/path

the result should be smth like:

$USER = user
$PASS = pass
$HOST = host
$PATH = path

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

Recommended Answers

All 2 Replies

or else you can use the cut -c option to cut the string into its parts.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.