?
Solved

How to embed comments in an FTP batch script?

Posted on 2008-10-13
4
Medium Priority
?
841 Views
Last Modified: 2013-12-26
Hi,

I have a  simple bash script that looks something like this:
#!/bin/sh
ftp -p < /home/scripts/getpl > /home/logs/getpllog.txt

and the getpl code looks like this:
open 999.99.9.999
pwd
cd ProdMstr
dir
prompt off
ascii
...and so on...

My question is, how do I embed comments in the "getpl"code?  I have tried //, #, -, and echo.  I just need to put some documentation in there and don't know if it's possible.

Thanks alot for your help!

Andy
0
Comment
Question by:abrusko
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:michofreiha
ID: 22702805
# should work fine...What is the problem with it?
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 2000 total points
ID: 22702982
!echo [comment] should work, if you'd like to have your comments in the ftp log, too.
It's a little 'expensive', because you will open (and close) a subshell for each '!echo'.
0
 
LVL 2

Author Comment

by:abrusko
ID: 22703037
//, #, - and echo all say "invalid command" in the output.  nothing abends, but the output says "invalid command".
0
 
LVL 2

Author Closing Comment

by:abrusko
ID: 31505579
!echo seems to work...still runs failry quickly...I'll go with that for now...thanks alot "w"!
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can use conditional statements using Python.
During and after that shift to cloud, one area that still poses a struggle for many organizations is what to do with their department file shares.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question