<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: ftp by shell script</title>
	<atom:link href="http://www.bradrice.com/wposx/archives/57/feed" rel="self" type="application/rss+xml" />
	<link>http://www.bradrice.com/wposx/archives/57</link>
	<description>This site is about scripting with a particular emphasis on OS X. Other things OS X, too.</description>
	<pubDate>Sun, 20 Jul 2008 22:19:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: links for 2007-05-10 &#187; Graham English Social Networking</title>
		<link>http://www.bradrice.com/wposx/archives/57#comment-1161</link>
		<dc:creator>links for 2007-05-10 &#187; Graham English Social Networking</dc:creator>
		<pubDate>Fri, 11 May 2007 19:04:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.bradrice.com/wposx/?p=57#comment-1161</guid>
		<description>[...] Mac OS X and Unix tips and tricks Â» Blog Archive Â» ftp by shell script Sometimes my sql is the only file that has changed on my site. So I have written a shell script that goes and grabs the sql file. (tags: FTP Mac Apple OSX MySQL Unix tips HowTo tutorials code programming scripts scripting) [...]</description>
		<content:encoded><![CDATA[<p>[...] Mac OS X and Unix tips and tricks Â» Blog Archive Â» ftp by shell script Sometimes my sql is the only file that has changed on my site. So I have written a shell script that goes and grabs the sql file. (tags: FTP Mac Apple OSX MySQL Unix tips HowTo tutorials code programming scripts scripting) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chandrakant</title>
		<link>http://www.bradrice.com/wposx/archives/57#comment-97</link>
		<dc:creator>Chandrakant</dc:creator>
		<pubDate>Fri, 02 Dec 2005 06:55:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.bradrice.com/wposx/?p=57#comment-97</guid>
		<description>I want to echo the reply sent by FTP server...
i used ftp in shell script...
#! /usr/bin/bash
server=$1
user=$2
password=$3
ftp -n $server</description>
		<content:encoded><![CDATA[<p>I want to echo the reply sent by FTP server&#8230;<br />
i used ftp in shell script&#8230;<br />
#! /usr/bin/bash<br />
server=$1<br />
user=$2<br />
password=$3<br />
ftp -n $server</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shawn Holwegner</title>
		<link>http://www.bradrice.com/wposx/archives/57#comment-71</link>
		<dc:creator>Shawn Holwegner</dc:creator>
		<pubDate>Fri, 19 Aug 2005 02:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.bradrice.com/wposx/?p=57#comment-71</guid>
		<description>Most 4.4-derived ftp clients can use the .netrc file for doing exactly what you've stated above.

A better (in my opinion) solution is to install NcFTP's clients; ncftpput/ncftpget are designed to be scriptable in a situation where you can not use scp.  As the post above me notes curl usage, I just happen to like NcFTP for it's globbing and other abilities.</description>
		<content:encoded><![CDATA[<p>Most 4.4-derived ftp clients can use the .netrc file for doing exactly what you&#8217;ve stated above.</p>
<p>A better (in my opinion) solution is to install NcFTP&#8217;s clients; ncftpput/ncftpget are designed to be scriptable in a situation where you can not use scp.  As the post above me notes curl usage, I just happen to like NcFTP for it&#8217;s globbing and other abilities.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Dodd</title>
		<link>http://www.bradrice.com/wposx/archives/57#comment-59</link>
		<dc:creator>Aaron Dodd</dc:creator>
		<pubDate>Sat, 25 Jun 2005 21:11:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.bradrice.com/wposx/?p=57#comment-59</guid>
		<description>I would suggest you chmod 700 since you store your username and password in the file.   755 allows anyone with access to your machine to read and execute your script.</description>
		<content:encoded><![CDATA[<p>I would suggest you chmod 700 since you store your username and password in the file.   755 allows anyone with access to your machine to read and execute your script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ted</title>
		<link>http://www.bradrice.com/wposx/archives/57#comment-54</link>
		<dc:creator>Ted</dc:creator>
		<pubDate>Fri, 13 May 2005 06:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.bradrice.com/wposx/?p=57#comment-54</guid>
		<description>curl is probably the best idea for this sort of thing on OS X.

However, you should also consider things like ncftpget. ncftp is a great command-line FTP client, and it comes with ncftpget which is an easy way to send command line requests for specific files.

You can also use rcp, scp, and rsync (as well as a number of other similar apps) for easy ways to pull down files.

All of these solutions are very portable to other OS's too.</description>
		<content:encoded><![CDATA[<p>curl is probably the best idea for this sort of thing on OS X.</p>
<p>However, you should also consider things like ncftpget. ncftp is a great command-line FTP client, and it comes with ncftpget which is an easy way to send command line requests for specific files.</p>
<p>You can also use rcp, scp, and rsync (as well as a number of other similar apps) for easy ways to pull down files.</p>
<p>All of these solutions are very portable to other OS&#8217;s too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DS</title>
		<link>http://www.bradrice.com/wposx/archives/57#comment-38</link>
		<dc:creator>DS</dc:creator>
		<pubDate>Tue, 22 Feb 2005 12:59:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.bradrice.com/wposx/?p=57#comment-38</guid>
		<description>I've found a better way to upload and download files on a ftp server. Try using curl. It's fast, easy and gives better results in shell script. For example :
&lt;code&gt;curl -s -T /Users/me/Sites/index.htm ftp://me:passwd@ftp.server.com/&lt;/code&gt;
lets you send directly the file index.htm you've prepared locally in your folder "Sites" to your distant Web server. While :
&lt;code&gt;curl -s ftp://ftp.server.com/"IMG*.jpg"&lt;/code&gt;
downloads every picture whose name begins with IMG and ends with the extension jpg.
In your case, you could try :
&lt;code&gt;curl -s http://www.bradrice.com/mydatabase.sql -o /Library/Webserver/Websites/localsite/mydatabase.sql&lt;/code&gt;
See "man curl" for more...</description>
		<content:encoded><![CDATA[<p>I&#8217;ve found a better way to upload and download files on a ftp server. Try using curl. It&#8217;s fast, easy and gives better results in shell script. For example :<br />
<code>curl -s -T /Users/me/Sites/index.htm <a href="ftp://me:passwd@ftp.server.com/" rel="nofollow">ftp://me:passwd@ftp.server.com/</a></code><br />
lets you send directly the file index.htm you&#8217;ve prepared locally in your folder &#8220;Sites&#8221; to your distant Web server. While :<br />
<code>curl -s <a href="ftp://ftp.server.com/" rel="nofollow">ftp://ftp.server.com/</a>&#8220;IMG*.jpg&#8221;</code><br />
downloads every picture whose name begins with IMG and ends with the extension jpg.<br />
In your case, you could try :<br />
<code>curl -s <a href="http://www.bradrice.com/mydatabase.sql" rel="nofollow">http://www.bradrice.com/mydatabase.sql</a> -o /Library/Webserver/Websites/localsite/mydatabase.sql</code><br />
See &#8220;man curl&#8221; for more&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
