Avatar of Dee
Dee
Flag for United States of America asked on

test script and upload file to ftp from Linux command line

I am being asked the following question on an job interview test.   My strength is in SQL which will comprise most of the duties.  I will be learning Linux on the job.  A few Linux questions were thrown into the mix on the test.

Any help here?

"You have written a script in a text editor on your Windows XP workstation, which is designed to run on your company’s Linux-based server. You need to upload it to that server via FTP or SCP, login via SSH, test that the script’s syntax is correct, and then execute that script. From the Windows & Linux command line, show the commands you would use to do this. You may specify instructions using whatever type of scripting language (Perl, Korn, Bash, etc…) you have experience with."
StoragePerl

Avatar of undefined
Last Comment
AlexPace

8/22/2022 - Mon
AlexPace

Remember that Windows has different line endings than Unix so you'll need to convert the line endings or send it in ASCII mode over FTP which should do the line ending conversion automatically on the fly...  whereas binary mode just sends the file exactly as-is so you'd end up with Windows line endings on the Linux box which would need to be fixed...  Newer SFTP (SSH) servers support a text mode that can do line-ending conversions but both the client and server have to support it so you would want to check that or just plan on doing the conversion.
Dee

ASKER
Can you give me example commands to do the ftp and test the script?

This is a research and learn part of the questionnaire as I am not expected to be proficient in this area.  I will credit this post for any code I use in a possible solution.
ASKER CERTIFIED SOLUTION
AlexPace

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23