<?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>Fri, 30 Jul 2010 15:59:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<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
&#40;set WF=&#41;

:: Look for file in the current directory

for %%a in &#40;&#34;&#34; %%&#41; do &#40;
if not defined WF if exist &#34;%~1%%~a&#34; set [...]]]></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: #66cc66;">&#40;</span><a href="http://www.ss64.com/nt/set.html"><span style="color: #b1b100; font-weight: bold;">set</span></a> WF=<span style="color: #66cc66;">&#41;</span><br />
<br />
:<span style="color: #b100b1; font-weight: bold;">: Look <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> file <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> 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: #66cc66;">&#40;</span>&quot;&quot; <span style="color: #33cc33;">%</span><span style="color: #33cc33;">%</span><span style="color: #66cc66;">&#41;</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <span style="color: #66cc66;">&#40;</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: #66cc66;">&#41;</span><br />
<br />
:<span style="color: #b100b1; font-weight: bold;">: Look <a href="http://www.ss64.com/nt/for.html"><span style="color: #00b100; font-weight: bold;">for</span></a> file <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> 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: #66cc66;">&#40;</span>&quot;&quot; <span style="color: #33cc33;">%</span><span style="color: #33cc33;">%</span><span style="color: #66cc66;">&#41;</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <span style="color: #66cc66;">&#40;</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: #66cc66;">&#40;</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: #66cc66;">&#41;</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <span style="color: #66cc66;">&#40;</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: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><br />
<br />
:<span style="color: #b100b1; font-weight: bold;">: 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: #66cc66;">&#40;</span>'help.exe *'<span style="color: #66cc66;">&#41;</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 />
<br />
:<span style="color: #b100b1; font-weight: bold;">: <a href="http://www.ss64.com/nt/if.html"><span style="color: #00b100; font-weight: bold;">If</span></a> command missing from Help, <a href="http://www.ss64.com/nt/goto.html"><span style="color: #00b100; font-weight: bold;">goto</span></a> end</span><br />
<br />
help.exe &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">~1</span>&quot; |find &quot;<span style="color: #33cc33;">%</span><span style="color: #448888;">HlpErr</span><span style="color: #33cc33;">%</span>&quot;&amp;gt;<a href="http://www.ss64.com/nt/nul.html"><span style="color: #0000ff; font-weight: bold;">nul</span></a> &amp;amp;&amp;amp; <a href="http://www.ss64.com/nt/goto.html"><span style="color: #00b100; font-weight: bold;">goto</span></a>:END<br />
<br />
:<span style="color: #b100b1; font-weight: bold;">: Listed <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> help so find file <a href="http://www.ss64.com/nt/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> 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: #66cc66;">&#40;</span>exe com<span style="color: #66cc66;">&#41;</span> <a href="http://www.ss64.com/nt/do.html"><span style="color: #00b100; font-weight: bold;">do</span></a> <span style="color: #66cc66;">&#40;</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: #66cc66;">&#41;</span><br />
<br />
:<span style="color: #b100b1; font-weight: bold;">: File <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/in.html"><span style="color: #00b100; font-weight: bold;">in</span></a> 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: #66cc66;">&#40;</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><span style="color: #66cc66;">&#41;</span> <a href="http://www.ss64.com/nt/else.html"><span style="color: #00b100; font-weight: bold;">else</span></a> <span style="color: #66cc66;">&#40;</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: #66cc66;">&#41;</span><br />
<br />
:<span style="color: #b100b1; font-weight: bold;">: Credits:</span><br />
:<span style="color: #b100b1; font-weight: bold;">: Clay Calvert</span><br />
:<span style="color: #b100b1; font-weight: bold;">: alt.msdos.batch.nt</span></div></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 {} [...]]]></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>
]]></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>
