*

Recent Posts

Welcome, Guest. Please login or register.
November 22, 2024, 02:59:43 PM

Login with username, password and session length

Members
  • Total Members: 61
  • Latest: AciDeX
Stats
  • Total Posts: 28505
  • Total Topics: 1915
  • Online Today: 128
  • Online Ever: 569
  • (August 02, 2024, 06:20:39 AM)
Users Online
Users: 0
Guests: 36
Total: 36

Permissions

Author Topic: ftp command string  (Read 4511 times)

0 Members and 1 Guest are viewing this topic.

Offline opiesilver

  • Administrator
  • Hero Member
  • *****
  • Posts: 3614
  • Karma: 5
  • Well, Santa is 2000 years old....
    • View Profile
ftp command string
« on: December 02, 2008, 12:51:18 PM »
Assuming I have a .netrc file in place can I add a command, in variable form, in this string?

ftp -v -d servername 4021 (`$command`) $filename

I know I've formatted this before and had it work internal to a script but cann't remember how I did it.

Maybe something like;

foreach filename (`cat file`)
     ftp -v -d servername 4021 (`$command`) $filename
end

where the command variable list is set out in another flat file.

Anyone have an opinion?
Mediocre people are always at their best.

Offline opiesilver

  • Administrator
  • Hero Member
  • *****
  • Posts: 3614
  • Karma: 5
  • Well, Santa is 2000 years old....
    • View Profile
Re: ftp command string
« Reply #1 on: December 03, 2008, 02:56:39 PM »
Forgot to mention this is an AIX box.
Mediocre people are always at their best.

Offline ZWarrior

  • Administrator
  • Hero Member
  • *****
  • Posts: 7798
  • Karma: 8
  • Shhh! Be wery wery qwiet...
    • View Profile
    • Ambush!
Re: ftp command string
« Reply #2 on: December 05, 2008, 10:20:34 AM »
I will have to refer to my FTP scripting stuff at home, but I think you can only call a script file, not use a command.  The script file can do all the commands you want though.

let me see what I can find out.
--------------------------------
Zoƫ: Shepard, isn't the Bible kind of specific about killing?
Book: Very specific. It is, however, somewhat fuzzy around the area of kneecaps.

Offline opiesilver

  • Administrator
  • Hero Member
  • *****
  • Posts: 3614
  • Karma: 5
  • Well, Santa is 2000 years old....
    • View Profile
Re: ftp command string
« Reply #3 on: December 05, 2008, 05:31:25 PM »
Here is what I've figured out;

1. I hate AIX because nothing works quite right.
2. Only under AIX operating systems can ftp call macros
3. You can place as many variables and command strings are you want in macro for ftp as long as you don't exceed 512kb.
4. Even if you know that you formatted the .netrc in the home directory perfectly that it doesn't mean that ftp on an AIX box will read it correct more than once.
5. My brain hurts.....
Mediocre people are always at their best.