?
Solved

How to embed comments in an FTP batch script?

Posted on 2008-10-13
4
Medium Priority
?
838 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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

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

Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will giveā€¦
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month15 days, 16 hours left to enroll

741 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