Solved

How to embed comments in an FTP batch script?

Posted on 2008-10-13
4
827 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
  • 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 500 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

911 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now