[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 847
  • Last Modified:

How to embed comments in an FTP batch script?

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
abrusko
Asked:
abrusko
  • 2
1 Solution
 
michofreihaCommented:
# should work fine...What is the problem with it?
0
 
woolmilkporcCommented:
!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
 
abruskoAuthor Commented:
//, #, - and echo all say "invalid command" in the output.  nothing abends, but the output says "invalid command".
0
 
abruskoAuthor Commented:
!echo seems to work...still runs failry quickly...I'll go with that for now...thanks alot "w"!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now