<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MemoSoup &#187; find</title>
	<atom:link href="http://www.memosoup.com/tag/find/feed" rel="self" type="application/rss+xml" />
	<link>http://www.memosoup.com</link>
	<description>Mix of the things I always forget</description>
	<lastBuildDate>Tue, 07 Feb 2012 00:03:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>WHICH command for DOS</title>
		<link>http://www.memosoup.com/20090921/which-command-for-dos.html</link>
		<comments>http://www.memosoup.com/20090921/which-command-for-dos.html#comments</comments>
		<pubDate>Mon, 21 Sep 2009 11:59:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[Windows & DOS]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[which]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=150</guid>
		<description><![CDATA[<p>If You need the analog of Unix &#8216;which&#8217; command and do not have Resource Kit, the following batch file will help. The code was found on www.ss64.com Published with the permission of the author, Clay Calvert.</p> @echo off SETLOCAL (set WF=) :: Look for file in the current directory for %%a in (&#34;&#34; %!!%) do [...]]]></description>
			<content:encoded><![CDATA[<p>If You need the analog of Unix &#8216;which&#8217; command and do not have Resource Kit, the following batch file will help.<br />
The code was found on <a href="http://www.ss64.com/nt/which.txt">www.ss64.com</a><br />
Published with the permission of the author, Clay Calvert.</p>
<div class="codecolorer-container dos default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="dos codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #33cc33;">@</span><a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a> off<br />
<a href="http://www.ss64.com/nt/setlocal.html"><span style="color: #b1b100; font-weight: bold;">SETLOCAL</span></a><br />
<span style="color: #33cc33;">(</span><a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> WF=<span style="color: #33cc33;">)</span><br />
<span style="color: #b100b1; font-style: italic;"><br />
:: Look for file in the current directory</span><br />
<br />
<a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> <span style="color: #33cc33;">%%</span><span style="color: #448888;">a</span> <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> <span style="color: #33cc33;">(</span>&quot;&quot; <span style="color: #33cc33;">%</span><span style="color: #33cc33;">!!</span><span style="color: #33cc33;">%)</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <span style="color: #33cc33;">(</span><br />
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> <a href="http://www.ss64.com/nt/defined.html"><span style="color: #000000; font-weight: bold;">defined</span></a> WF <a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/exist.html"><span style="color: #000000; font-weight: bold;">exist</span></a> &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">~1</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">~a</span>&quot; <a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> WF=<span style="color: #33cc33;">%</span><span style="color: #448888;">CD</span><span style="color: #33cc33;">%</span>\<span style="color: #33cc33;">%</span><span style="color: #448888;">~1</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">~a</span><span style="color: #33cc33;">)</span><br />
<span style="color: #b100b1; font-style: italic;"><br />
:: Look for file in the PATH</span><br />
<br />
<a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> <span style="color: #33cc33;">%%</span><span style="color: #448888;">a</span> <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> <span style="color: #33cc33;">(</span>&quot;&quot; <span style="color: #33cc33;">%</span><span style="color: #33cc33;">!!</span><span style="color: #33cc33;">%)</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <span style="color: #33cc33;">(</span><br />
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> <a href="http://www.ss64.com/nt/defined.html"><span style="color: #000000; font-weight: bold;">defined</span></a> WF <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> <span style="color: #33cc33;">%%</span><span style="color: #448888;">g</span> <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> <span style="color: #33cc33;">(</span>&quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">~1</span><span style="color: #33cc33;">%%</span><span style="color: #448888;">~a</span>&quot;<span style="color: #33cc33;">)</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <span style="color: #33cc33;">(</span><br />
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/exist.html"><span style="color: #000000; font-weight: bold;">exist</span></a> &quot;<span style="color: #33cc33;">%</span><span style="color: #33cc33;">%</span>~$PATH:g&quot; <a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> WF=<span style="color: #33cc33;">%</span><span style="color: #33cc33;">%</span>~$PATH:g<span style="color: #33cc33;">))</span><br />
<span style="color: #b100b1; font-style: italic;"><br />
:: Store the Help Error message</span><br />
<br />
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">NOT</span></a> &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">~x1</span>&quot;==&quot;&quot; <a href="http://www.ss64.com/nt/goto.html"><span style="color: #00b100; font-weight: bold;">goto</span></a>:END<br />
<a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> /f &quot;delims=.&quot; <span style="color: #33cc33;">%%</span><span style="color: #448888;">a</span> <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> <span style="color: #33cc33;">(</span>'help.exe *'<span style="color: #33cc33;">)</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> HlpErr=<span style="color: #33cc33;">%%</span><span style="color: #448888;">a</span><br />
<span style="color: #b100b1; font-style: italic;"><br />
:: If command missing from Help, goto end</span><br />
<br />
help.exe &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">~1</span>&quot; <span style="color: #33cc33;">|</span>find &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">HlpErr</span><span style="color: #33cc33;">%</span>&quot;<span style="color: #33cc33;">&amp;</span>gt;<a href="http://www.ss64.com/nt/nul.html"><span style="color: #0000ff; font-weight: bold;">nul</span></a> <span style="color: #33cc33;">&amp;</span>amp;<span style="color: #33cc33;">&amp;</span>amp; <a href="http://www.ss64.com/nt/goto.html"><span style="color: #00b100; font-weight: bold;">goto</span></a>:END<br />
<span style="color: #b100b1; font-style: italic;"><br />
:: Listed in help so find file in System32</span><br />
<br />
<a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> <span style="color: #33cc33;">%%</span><span style="color: #448888;">a</span> <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> <span style="color: #33cc33;">(</span>exe com<span style="color: #33cc33;">)</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <span style="color: #33cc33;">(</span><br />
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> /i &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">WF</span><span style="color: #33cc33;">%</span>&quot;==&quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">windir</span><span style="color: #33cc33;">%</span>\system32\<span style="color: #33cc33;">%</span><span style="color: #448888;">~1</span>.<span style="color: #33cc33;">%%</span><span style="color: #448888;">a</span>&quot; <a href="http://www.ss64.com/nt/goto.html"><span style="color: #00b100; font-weight: bold;">goto</span></a>:END<span style="color: #33cc33;">)</span><br />
<span style="color: #b100b1; font-style: italic;"><br />
:: File not in System32, so must be an internal command</span><br />
<br />
<a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> WF=&quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">~1</span>&quot; is an internal command<br />
<br />
:<span style="color: #b100b1; font-weight: bold;">END</span><br />
<a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">if</span></a> <a href="http://www.ss64.com/nt/defined.html"><span style="color: #000000; font-weight: bold;">defined</span></a> WF <span style="color: #33cc33;">(</span><a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a>.<span style="color: #33cc33;">%</span><span style="color: #448888;">WF</span><span style="color: #33cc33;">%)</span> <a href="http://www.ss64.com/nt/else.html"><span style="color: #00b100; font-weight: bold;">else</span></a> <span style="color: #33cc33;">(</span><br />
<a href="http://www.ss64.com/nt/echo.html"><span style="color: #b1b100; font-weight: bold;">echo</span></a> The file: &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">~1</span>&quot; was <a href="http://www.ss64.com/nt/not.html"><span style="color: #000000; font-weight: bold;">not</span></a> found<span style="color: #33cc33;">)</span><br />
<span style="color: #b100b1; font-style: italic;"><br />
:: Credits:</span><br />
<span style="color: #b100b1; font-style: italic;">:: Clay Calvert</span><br />
<span style="color: #b100b1; font-style: italic;">:: alt.msdos.batch.nt</span></div></div>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20090921%2Fwhich-command-for-dos.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20090921/which-command-for-dos.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="WHICH command for DOS" data-url="http://www.memosoup.com/20090921/which-command-for-dos.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20090921/which-command-for-dos.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>grep in find command: how to display file names</title>
		<link>http://www.memosoup.com/20090913/grep-in-find-command-how-to-display-file-names.html</link>
		<comments>http://www.memosoup.com/20090913/grep-in-find-command-how-to-display-file-names.html#comments</comments>
		<pubDate>Sat, 12 Sep 2009 22:09:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[filename]]></category>
		<category><![CDATA[find]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=73</guid>
		<description><![CDATA[<p>Here is very simple trick to force the grep command to display file name, when it&#8217;s used together with find operation. Just write /dev/null as the &#8220;second file&#8221;</p> <p>find . -type f -exec grep somestring {} /dev/null \;</p> Tweet news and informations&#160;automotive,business,crime,health,life,politics,science,technology,travelautomotive,business,crime,health,life,politics,science,technology,travel]]></description>
			<content:encoded><![CDATA[<p>Here is very simple trick to force the grep command to display file name, when it&#8217;s used together with <strong>find</strong> operation.<br />
Just write <strong>/dev/null</strong> as the &#8220;second file&#8221;</p>
<p>find . -type f -exec grep <em>somestring</em> {} <strong>/dev/null</strong> \;</p>
<div style="height:33px; padding-top:2px; padding-bottom:2px; clear:both;" class="zare366"><div style="float:left; width:100px; " class="zare366_facebook_like"> 
				<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.memosoup.com%2F20090913%2Fgrep-in-find-command-how-to-display-file-names.html&amp;layout=button_count&amp;show_faces=false&amp;width=100&amp;action=like&amp;colorscheme=light&amp;height=27" 
					scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:27px;" allowTransparency="true"></iframe>
			</div><div style="float:left; width:90px; padding-left:10px;" class="zare366_google1"> 
				<g:plusone size="medium" href="http://www.memosoup.com/20090913/grep-in-find-command-how-to-display-file-names.html" ></g:plusone>
			</div><div style="float:left; width:110px; padding-left:10px;" class="zare366_twitter"> 
				<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" 
					data-text="grep in find command: how to display file names" data-url="http://www.memosoup.com/20090913/grep-in-find-command-how-to-display-file-names.html">Tweet</a> 
			</div></div>
		<div style="display:none;"><a href="http://www.news365live.com">news and informations</a>&nbsp;<a href="http://news365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a><a href="http://worldnews365online.com">automotive,business,crime,health,life,politics,science,technology,travel</a></div><div style="clear:both;"></div>]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20090913/grep-in-find-command-how-to-display-file-names.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

