<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.wiki.mohid.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=89.180.206.215&amp;*</id>
		<title>MohidWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.wiki.mohid.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=89.180.206.215&amp;*"/>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Special:Contributions/89.180.206.215"/>
		<updated>2026-04-05T02:06:30Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.0</generator>

	<entry>
		<id>http://www.wiki.mohid.com/index.php?title=Grep&amp;diff=294</id>
		<title>Grep</title>
		<link rel="alternate" type="text/html" href="http://www.wiki.mohid.com/index.php?title=Grep&amp;diff=294"/>
				<updated>2007-07-29T18:20:41Z</updated>
		
		<summary type="html">&lt;p&gt;89.180.206.215: /* Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The [[grep]] command serves in shell scripting and in OS command lines to filter out relevant ASCII data from standard input. It's best used in conjunction with [http://en.wikipedia.org/wiki/Pipe_(Unix) pipes].&lt;br /&gt;
&lt;br /&gt;
==Regexps==&lt;br /&gt;
The dot '.' is a basic wildcard that will stand for any character. For example&lt;br /&gt;
 &amp;gt; ll | grep d.t&lt;br /&gt;
will list all lines containing dat, ''dut'', ''dit'', ''dot'', etc...&lt;br /&gt;
The following will look for any line containing ''hello.gif'':&lt;br /&gt;
 &amp;gt; ll | grep 'hello\.gif'&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
For example, the following command will only display the files containing a ''.dat'' extension.&lt;br /&gt;
 &amp;gt; ls -l | grep .dat&lt;br /&gt;
Here's the same example for dos (windows)&lt;br /&gt;
 &amp;gt; dir /B | grep .dat&lt;br /&gt;
&lt;br /&gt;
The following example lists only directories (i.e. everything but lines ending with '.????' or '.???' or '.??')&lt;br /&gt;
&lt;br /&gt;
in dos&lt;br /&gt;
 $ dir /B /S | grep &amp;quot;[^.]....$&amp;quot; | grep &amp;quot;[^.]...$&amp;quot; | grep &amp;quot;[^.]..$&amp;quot;&lt;br /&gt;
in linux&lt;br /&gt;
 &amp;gt; find . | grep '[^.]....$' | grep '[^.]...$' | grep '[^.]..$'&lt;br /&gt;
&lt;br /&gt;
Here's another example that lists every hdf5 file except the ''Interface'''S'''edimentWater''&lt;br /&gt;
 &amp;gt; find . | grep '.hdf5$' | grep '^...........[^S]'&lt;br /&gt;
&lt;br /&gt;
Here's an example that lists everything except the pattern&lt;br /&gt;
 &amp;gt; find .| grep '\.f90' | grep -v 'GOTMvariables'&lt;br /&gt;
&lt;br /&gt;
This example will show only the crond daemon&lt;br /&gt;
&lt;br /&gt;
 &amp;gt; ps -aux | grep crond&lt;br /&gt;
&lt;br /&gt;
==External References==&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Grep Grep in WikiPedia.]&lt;br /&gt;
*[http://gnuwin32.sourceforge.net/packages/grep.htm Grep for windows.]&lt;br /&gt;
*[http://pegasus.rutgers.edu/~elflord/unix/grep.html Tutorial.]&lt;br /&gt;
[[Category:Tools]]&lt;br /&gt;
[[Category:Linux]]&lt;br /&gt;
[[Category:Technology]]&lt;/div&gt;</summary>
		<author><name>89.180.206.215</name></author>	</entry>

	</feed>