<?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"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Use BASH nullglob To Verify *.c Files Exists or Not In a Directory</title> <atom:link href="http://www.cyberciti.biz/faq/bash-shell-check-for-any-mp3-files-in-directory/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/bash-shell-check-for-any-mp3-files-in-directory/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Chelsia</title><link>http://www.cyberciti.biz/faq/bash-shell-check-for-any-mp3-files-in-directory/#comment-60947</link> <dc:creator>Chelsia</dc:creator> <pubDate>Sat, 23 Jul 2011 11:19:57 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3398#comment-60947</guid> <description>Mighty useful. Make no mistake, I aprpceiate it.</description> <content:encoded><![CDATA[<p>Mighty useful. Make no mistake, I aprpceiate it.</p> ]]></content:encoded> </item> <item><title>By: flabdablet</title><link>http://www.cyberciti.biz/faq/bash-shell-check-for-any-mp3-files-in-directory/#comment-51095</link> <dc:creator>flabdablet</dc:creator> <pubDate>Wed, 24 Nov 2010 08:51:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3398#comment-51095</guid> <description>The &lt;b&gt;for name in pattern&lt;/b&gt; construction is good for doing stuff to all matching files, but sometimes all that&#039;s needed is a quick test for whether at least one matching file exists. The &lt;b&gt;stat&lt;/b&gt; command can help with that:
&lt;code&gt;
if stat -t *.mp3 &gt;/dev/null 2&gt;&amp;1
then
echo At least one file matching *.mp3 exists
else
echo No files match *.mp3
fi
&lt;/code&gt;
This is portable to shells other than bash, many of which don&#039;t support nullglob.</description> <content:encoded><![CDATA[<p>The <b>for name in pattern</b> construction is good for doing stuff to all matching files, but sometimes all that&#8217;s needed is a quick test for whether at least one matching file exists. The <b>stat</b> command can help with that:<br
/> <code><br
/> if stat -t *.mp3 &gt;/dev/null 2&gt;&amp;1<br
/> then<br
/> echo At least one file matching *.mp3 exists<br
/> else<br
/> echo No files match *.mp3<br
/> fi<br
/> </code><br
/> This is portable to shells other than bash, many of which don&#8217;t support nullglob.</p> ]]></content:encoded> </item> <item><title>By: waltz</title><link>http://www.cyberciti.biz/faq/bash-shell-check-for-any-mp3-files-in-directory/#comment-50780</link> <dc:creator>waltz</dc:creator> <pubDate>Mon, 15 Nov 2010 06:32:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3398#comment-50780</guid> <description>great explanation to make complicated things simple!
Nice example too.
Thank you very much</description> <content:encoded><![CDATA[<p>great explanation to make complicated things simple!<br
/> Nice example too.<br
/> Thank you very much</p> ]]></content:encoded> </item> <item><title>By: jaysunn</title><link>http://www.cyberciti.biz/faq/bash-shell-check-for-any-mp3-files-in-directory/#comment-45500</link> <dc:creator>jaysunn</dc:creator> <pubDate>Sun, 10 Jan 2010 16:37:08 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3398#comment-45500</guid> <description>Great Lesson,
I was just introduced to this via Vivek.  I am planning to use this feature in many ways.
Thanks,
Jaysunn</description> <content:encoded><![CDATA[<p>Great Lesson,<br
/> I was just introduced to this via Vivek.  I am planning to use this feature in many ways.</p><p>Thanks,</p><p>Jaysunn</p> ]]></content:encoded> </item> <item><title>By: Vivek Gite</title><link>http://www.cyberciti.biz/faq/bash-shell-check-for-any-mp3-files-in-directory/#comment-40641</link> <dc:creator>Vivek Gite</dc:creator> <pubDate>Sat, 07 Mar 2009 11:43:00 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3398#comment-40641</guid> <description>&lt;blockquote&gt;How do you know these things? Either you must have the memory of an elephant, or know how to use google in some magic way :)&lt;/blockquote&gt;
I&#039;ve been using UNIX and Linux for over decade so I know lots of things. bash man page has all the info.
&lt;blockquote&gt;One thing I don’t understand is why certain bash variables are stored with shopt and others with environment variables (like IFS). Historic reasons?&lt;/blockquote&gt;
shopt use to toggle the values of variables controlling optional behavior. Usually it can be on or off only. On other hand, IFS value can be anything as per users requirements.</description> <content:encoded><![CDATA[<blockquote><p>How do you know these things? Either you must have the memory of an elephant, or know how to use google in some magic way :)</p></blockquote><p>I&#8217;ve been using UNIX and Linux for over decade so I know lots of things. bash man page has all the info.</p><blockquote><p>One thing I don’t understand is why certain bash variables are stored with shopt and others with environment variables (like IFS). Historic reasons?</p></blockquote><p>shopt use to toggle the values of variables controlling optional behavior. Usually it can be on or off only. On other hand, IFS value can be anything as per users requirements.</p> ]]></content:encoded> </item> <item><title>By: bratwurst</title><link>http://www.cyberciti.biz/faq/bash-shell-check-for-any-mp3-files-in-directory/#comment-40640</link> <dc:creator>bratwurst</dc:creator> <pubDate>Sat, 07 Mar 2009 11:33:49 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/?p=3398#comment-40640</guid> <description>How do you know these things? Either you must have the memory of an elephant, or know how to use google in some magic way :)
One thing I don&#039;t understand is why certain bash variables are stored with shopt and others with environment variables (like IFS). Historic reasons?</description> <content:encoded><![CDATA[<p>How do you know these things? Either you must have the memory of an elephant, or know how to use google in some magic way :)</p><p>One thing I don&#8217;t understand is why certain bash variables are stored with shopt and others with environment variables (like IFS). Historic reasons?</p> ]]></content:encoded> </item> </channel> </rss>
