Mariselvam
Mariselvam

Reputation: 1113

how to handle ftp response code within bash script

I am writing a bash script to do automated FTP file transfer. does anyone know how to handle ftp response codes in bash script ? for example ,If I want to handle the response code 530 - Not logged in , how can i do it ?

Upvotes: 1

Views: 269

Answers (1)

glenn jackman
glenn jackman

Reputation: 246764

I'd recommend you use a different language with a well-tested FTP library: Perl, Ruby, Python. These libraries will make it simpler to retrieve the response codes.

I once wrote an Expect script to do FTP automations, but then I realized I'd wasted a lot of time.

Upvotes: 1

Related Questions