<?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: A Collection of Little Known Coding For UNIX</title>
	<atom:link href="http://designreviver.com/tips/a-collection-of-little-known-coding-for-unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://designreviver.com/tips/a-collection-of-little-known-coding-for-unix/</link>
	<description></description>
	<lastBuildDate>Sat, 04 Feb 2012 13:48:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: jcubic</title>
		<link>http://designreviver.com/tips/a-collection-of-little-known-coding-for-unix/comment-page-1/#comment-18454</link>
		<dc:creator>jcubic</dc:creator>
		<pubDate>Thu, 14 Oct 2010 04:23:55 +0000</pubDate>
		<guid isPermaLink="false">http://designreviver.com/?p=3292#comment-18454</guid>
		<description>I have couple of commands I use: (I have this in my .bashrc)

find . -name &quot;*.txt&quot; -print0 &#124; xargs grep -H pattern

search for pattern in all txt files in current directory.

alias c-c=&#039;xclip -sel clip&#039;
alias c-v=&#039;xclip -o -sel clip&#039;

two aliases for copy to and from clipboard (like CTRL+C and CTRL+V shortcuts) you can use it: 
cat file.txt &#124; c-c or c-c  file.txt
save clipboard in file.txt

function lines-from() {
  sed -e &quot;/$1/,\$b&quot; -e &#039;d&#039;
}

function lines-between() {
    sed -e &quot;0,/$1/d&quot; -e &quot;/$2/,\$d&quot;
}

two functions for (as names says) display lines between two patterns and lines begining from pattern.

find . -name Thumbs.db -print0 &#124; xargs -0 rm

rm all Thumbs.db files (left from Windows) from current directory.

seq -s* 100 &#124; bc

calculate factorial of 100 (100!)

convert numbers

echo &quot;ibase=2;&quot; &#124; bc           binary to octal

echo &quot;obase=16;&quot; &#124; bc          to hex

echo &quot;obase=2;&quot; &#124; bc           to binary

echo &quot;obase=10;&quot; &#124; bc          to dec

function wiki() { dig +short txt $1.wp.dg.cx; }

display wiki content via dns

function blue() {
    echo -e &quot;\x1b[34m\x1b[1m&quot;$@&quot;\x1b[0m&quot;;
}

display arguments in blue

function green() {
    echo -e &quot;\x1b[32m\x1b[1m&quot;$@&quot;\x1b[0m&quot;;
}

display arguments in green

function red() {
    echo -e &quot;\x1b[31m\x1b[1m&quot;$@&quot;\x1b[0m&quot;;
}

display arguments in red

function md5check() {
    test `md5sum $2 &#124; cut -d&#039; &#039; -f1` = &quot;$1&quot; &amp;&amp; green pass &#124;&#124; red fail
}

function check if filename (first argument) has md5 hash (second argument)

md5check  e68a6f2183d441c9ab6d59d8c2eb5ad5

function who-use() { 
    lsof &quot;$1&quot; &#124; grep -v COMMAND &#124; cut -d&#039; &#039; -f1; 
}

display processes which use particular file

function msg {
    zenity --info --title=&quot;$1&quot; --text=&quot;$2&quot;;
}

display GUI message box

function input {
    zenity --entry --title=&quot;$1&quot;;
}

display GUI prompt with input box</description>
		<content:encoded><![CDATA[<div class="KonaBody">I have couple of commands I use: (I have this in my .bashrc)</p>
<p>find . -name &#8220;*.txt&#8221; -print0 | xargs grep -H pattern</p>
<p>search for pattern in all txt files in current directory.</p>
<p>alias c-c=&#8217;xclip -sel clip&#8217;<br />
alias c-v=&#8217;xclip -o -sel clip&#8217;</p>
<p>two aliases for copy to and from clipboard (like CTRL+C and CTRL+V shortcuts) you can use it:<br />
cat file.txt | c-c or c-c  file.txt<br />
save clipboard in file.txt</p>
<p>function lines-from() {<br />
  sed -e &#8220;/$1/,\$b&#8221; -e &#8216;d&#8217;<br />
}</p>
<p>function lines-between() {<br />
    sed -e &#8220;0,/$1/d&#8221; -e &#8220;/$2/,\$d&#8221;<br />
}</p>
<p>two functions for (as names says) display lines between two patterns and lines begining from pattern.</p>
<p>find . -name Thumbs.db -print0 | xargs -0 rm</p>
<p>rm all Thumbs.db files (left from Windows) from current directory.</p>
<p>seq -s* 100 | bc</p>
<p>calculate factorial of 100 (100!)</p>
<p>convert numbers</p>
<p>echo &#8220;ibase=2;&#8221; | bc           binary to octal</p>
<p>echo &#8220;obase=16;&#8221; | bc          to hex</p>
<p>echo &#8220;obase=2;&#8221; | bc           to binary</p>
<p>echo &#8220;obase=10;&#8221; | bc          to dec</p>
<p>function wiki() { dig +short txt $1.wp.dg.cx; }</p>
<p>display wiki content via dns</p>
<p>function blue() {<br />
    echo -e &#8220;\x1b[34m\x1b[1m&#8221;$@&#8221;\x1b[0m&#8221;;<br />
}</p>
<p>display arguments in blue</p>
<p>function green() {<br />
    echo -e &#8220;\x1b[32m\x1b[1m&#8221;$@&#8221;\x1b[0m&#8221;;<br />
}</p>
<p>display arguments in green</p>
<p>function red() {<br />
    echo -e &#8220;\x1b[31m\x1b[1m&#8221;$@&#8221;\x1b[0m&#8221;;<br />
}</p>
<p>display arguments in red</p>
<p>function md5check() {<br />
    test `md5sum $2 | cut -d&#8217; &#8216; -f1` = &#8220;$1&#8243; &amp;&amp; green pass || red fail<br />
}</p>
<p>function check if filename (first argument) has md5 hash (second argument)</p>
<p>md5check  e68a6f2183d441c9ab6d59d8c2eb5ad5</p>
<p>function who-use() {<br />
    lsof &#8220;$1&#8243; | grep -v COMMAND | cut -d&#8217; &#8216; -f1;<br />
}</p>
<p>display processes which use particular file</p>
<p>function msg {<br />
    zenity &#8211;info &#8211;title=&#8221;$1&#8243; &#8211;text=&#8221;$2&#8243;;<br />
}</p>
<p>display GUI message box</p>
<p>function input {<br />
    zenity &#8211;entry &#8211;title=&#8221;$1&#8243;;<br />
}</p>
<p>display GUI prompt with input box</p></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Notable Tech Posts &#8211; 2009.11.15 &#124; The Life of Lew Ayotte</title>
		<link>http://designreviver.com/tips/a-collection-of-little-known-coding-for-unix/comment-page-1/#comment-11082</link>
		<dc:creator>Notable Tech Posts &#8211; 2009.11.15 &#124; The Life of Lew Ayotte</dc:creator>
		<pubDate>Sun, 15 Nov 2009 17:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://designreviver.com/?p=3292#comment-11082</guid>
		<description>[...] A collection of little known coding for unix [...]</description>
		<content:encoded><![CDATA[<div class="KonaBody">[...] A collection of little known coding for unix [...]</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danaville &#187; Blog Archive &#187; unix</title>
		<link>http://designreviver.com/tips/a-collection-of-little-known-coding-for-unix/comment-page-1/#comment-10978</link>
		<dc:creator>Danaville &#187; Blog Archive &#187; unix</dc:creator>
		<pubDate>Tue, 10 Nov 2009 07:41:26 +0000</pubDate>
		<guid isPermaLink="false">http://designreviver.com/?p=3292#comment-10978</guid>
		<description>[...]  A Collection of Little Known Coding For unix &#124; Design Reviver  The popular unix® operating system is almost like a huge, uncharted desert. When you traverse the area, you can pick up tools that will help you. These tools. [...]</description>
		<content:encoded><![CDATA[<div class="KonaBody">[...]  A Collection of Little Known Coding For unix | Design Reviver  The popular unix® operating system is almost like a huge, uncharted desert. When you traverse the area, you can pick up tools that will help you. These tools. [...]</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Collection of Little Known Coding For UNIX &#124; Lively Design Tuts</title>
		<link>http://designreviver.com/tips/a-collection-of-little-known-coding-for-unix/comment-page-1/#comment-10959</link>
		<dc:creator>A Collection of Little Known Coding For UNIX &#124; Lively Design Tuts</dc:creator>
		<pubDate>Mon, 09 Nov 2009 11:50:38 +0000</pubDate>
		<guid isPermaLink="false">http://designreviver.com/?p=3292#comment-10959</guid>
		<description>[...] Direct Link [...]</description>
		<content:encoded><![CDATA[<div class="KonaBody">[...] Direct Link [...]</div>
]]></content:encoded>
	</item>
</channel>
</rss>

