Solved

How to embed comments in an FTP batch script?

Posted on 2008-10-13
4
826 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Utilizing an array to gracefully append to a list of EmailAddresses
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

758 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

21 Experts available now in Live!

Get 1:1 Help Now