Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: single line reply



Usually with a command line tool you can use the < to pipe text into the
application. For example, ftp somehost.com < "mypass". That may not work
well with something that needs multiple lines of input, but you can also put
everything in a text file on a different line (i think) and feed that in.
eg, ftp somehost.com < filewithuserandpass

Another option for ftp is to use curl. You can do just about everything
from the command line. Just use curl -O ftp://user:email@hidden to
download a file.

It's not a catch all solution, but it might help.

//steve





> > I'm trying to get some ideas down for shell scripting, but I don't know
> > enough to make one thing work. Using something like passwd for example,
> > when you tell it you want to change a password and type:
> >
> > passwd username
> >
> > the system brings up a prompt asking for the new password. Then, it
> > wants to confirm it (logical choice).
> >
> > Or using ftp and an example...
> >
> > ftp ftp.domain.tld
> >
> > the application will ask for a login and then after that's entered, ask
> > for a password.
> >
> > If I wanted to script something to automatically log in to an ftp server
> > and upload a file, how would I do it with a single command string on one
> > line?
> >
> > -Michael
> >
> > --__--__--
> _______________________________________________
> macos-x-server mailing list | email@hidden
> Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macos-x-server
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
macos-x-server mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macos-x-server
Do not post admin requests to the list. They will be ignored.

References: 
 >RE: single line reply (From: Ryan Suarez <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.