<?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>BEAUTIFUL WORK</title>
	<atom:link href="http://www.beautifulwork.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.beautifulwork.org</link>
	<description>FREE   EXAMPLES FOR LEARNING</description>
	<lastBuildDate>Mon, 20 May 2013 19:14:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Testing  For File Charactereristics</title>
		<link>http://www.beautifulwork.org/2013/05/20/testing-for-file-charactereristics/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=testing-for-file-charactereristics</link>
		<comments>http://www.beautifulwork.org/2013/05/20/testing-for-file-charactereristics/#comments</comments>
		<pubDate>Mon, 20 May 2013 19:13:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8416</guid>
		<description><![CDATA[knowledge representation $cat test.sh #!/usr/bin/env bash # cookbook filename: checkfile # DIRPLACE=/tmp INFILE=/home/jeffrin/amazing.data OUTFILE=/home/jeffrin/more.results if [ -d "$DIRPLACE" ] then cd $DIRPLACE if [ -e "$INFILE" ] then if [ -w "$OUTFILE" ] then doscience < "$INFILE" >> "$OUTFILE" else echo "can not write to $OUTFILE" fi else echo "can not read from $INFILE" fi [...]]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$cat test.sh 
#!/usr/bin/env bash
# cookbook filename: checkfile
#
DIRPLACE=/tmp
INFILE=/home/jeffrin/amazing.data
OUTFILE=/home/jeffrin/more.results
if [ -d "$DIRPLACE" ]
then
cd $DIRPLACE
if [ -e "$INFILE" ]
then
if [ -w "$OUTFILE" ]
then
doscience < "$INFILE" >> "$OUTFILE"
else
echo "can not write to $OUTFILE"
fi
else
echo "can not read from $INFILE"
fi
else
echo "can not cd into $DIRPLACE"
fi

$sh test.sh 
can not read from /home/jeffrin/amazing.data
$> /home/jeffrin/amazing.data
$sh test.sh 
can not write to /home/jeffrin/more.results
$> /home/jeffrin/more.results
$sh test.sh 
test.sh: 14: test.sh: doscience: not found
$

</pre>
<p>related source : Bash CookBook</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/05/20/testing-for-file-charactereristics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>here-document       . Bash</title>
		<link>http://www.beautifulwork.org/2013/05/06/here-document-bash/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=here-document-bash</link>
		<comments>http://www.beautifulwork.org/2013/05/06/here-document-bash/#comments</comments>
		<pubDate>Mon, 06 May 2013 13:11:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cat]]></category>
		<category><![CDATA[gre]]></category>
		<category><![CDATA[here-document]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8383</guid>
		<description><![CDATA[knowledge representation $cat hdoc.sh #!/bin/bash cat $1 &#60;&#60;EOF EOF &#160; $sh hdoc.sh bash.txt hack hacker $ $cat bash.txt hack hacker $vim hdoc.sh $ $cat hdoc.sh #!/bin/bash grep $1 &#60;&#60;EOF name jeffrin age 36 sex male EOF $sh hdoc.sh 3 age 36 $ &#160;]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$cat hdoc.sh
#!/bin/bash

cat $1 &lt;&lt;EOF
EOF

&nbsp;

$sh hdoc.sh bash.txt
hack
hacker
$
$cat bash.txt
hack
hacker
$vim hdoc.sh
$
$cat hdoc.sh
#!/bin/bash

grep $1 &lt;&lt;EOF
name jeffrin
age 36
sex male
EOF

$sh hdoc.sh 3
age 36
$

&nbsp;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/05/06/here-document-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nohup . no hangup</title>
		<link>http://www.beautifulwork.org/2013/05/05/nohup-no-hangup/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nohup-no-hangup</link>
		<comments>http://www.beautifulwork.org/2013/05/05/nohup-no-hangup/#comments</comments>
		<pubDate>Sun, 05 May 2013 17:38:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[hup]]></category>
		<category><![CDATA[nohup]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8381</guid>
		<description><![CDATA[knowledge representation $cat loop.c main() { for (;;); } $./a.out ^C $nohup ./a.out nohup: ignoring input and appending output to `nohup.out' ^C $cat nohup.out $ls nohup.out nohup.out $]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$cat loop.c 
main()
{
for (;;);
}

$./a.out 
^C
$nohup ./a.out 
nohup: ignoring input and appending output to `nohup.out'
^C
$cat nohup.out 
$ls nohup.out 
nohup.out
$

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/05/05/nohup-no-hangup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash .  Running Several Commands All at Once</title>
		<link>http://www.beautifulwork.org/2013/05/03/8376/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=8376</link>
		<comments>http://www.beautifulwork.org/2013/05/03/8376/#comments</comments>
		<pubDate>Fri, 03 May 2013 06:49:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Command Line Interface Language]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[background job]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8376</guid>
		<description><![CDATA[knowledge representation $ls src war $cd &#038; ls &#038; [1] 2587 [2] 2588 $src war [1]- Done cd [2]+ Done ls --color=auto $pwd /home/jeffrin/beautiful-work $ $cd &#038; ls &#038; cd &#038; [1] 2590 [2] 2591 [3] 2592 $src war [1] Done cd [2]- Done ls --color=auto [3]+ Done cd $pwd /home/jeffrin/beautiful-work $cd .. &#038; pwd [...]]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$ls
src  war
$cd &#038; ls &#038;
[1] 2587
[2] 2588
$src  war

[1]-  Done                    cd
[2]+  Done                    ls --color=auto
$pwd
/home/jeffrin/beautiful-work
$
$cd &#038; ls &#038; cd &#038;
[1] 2590
[2] 2591
[3] 2592
$src  war

[1]   Done                    cd
[2]-  Done                    ls --color=auto
[3]+  Done                    cd
$pwd
/home/jeffrin/beautiful-work
$cd .. &#038; pwd  &#038;
[1] 2593
[2] 2594
$/home/jeffrin/beautiful-work

[1]-  Done                    cd ..
[2]+  Done                    pwd
$pwd
/home/jeffrin/beautiful-work
$cd &#038;
[1] 2614
$pwd
/home/jeffrin/beautiful-work
[1]+  Done                    cd
$ls &#038; cd ; pwd
[1] 2625
/home/jeffrin
$src  war

[1]+  Done                    ls --color=auto  (wd: ~/beautiful-work)
(wd now: ~)
$pwd
/home/jeffrin
$

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/05/03/8376/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>input redirection indicated by   &lt;   character</title>
		<link>http://www.beautifulwork.org/2013/04/30/input-redirection-indicated-by-character/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=input-redirection-indicated-by-character</link>
		<comments>http://www.beautifulwork.org/2013/04/30/input-redirection-indicated-by-character/#comments</comments>
		<pubDate>Tue, 30 Apr 2013 14:30:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[< character]]></category>
		<category><![CDATA[input redirection]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8374</guid>
		<description><![CDATA[knowledge representation $cat bash.txt hack hacker $cat < bash.txt hack hacker $wc < bash.txt 2 2 12 $wc -l < bash.txt 2 $cat bash.txt &#124; wc 2 2 12 $echo hello > yab.txt $cat yab.txt hello $wc < yab.txt 1 1 6 $]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$cat bash.txt 
hack
hacker
$cat < bash.txt 
hack
hacker
$wc < bash.txt 
 2  2 12
$wc -l  < bash.txt 
2
$cat bash.txt | wc
      2       2      12
$echo hello > yab.txt
$cat yab.txt 
hello
$wc < yab.txt 
1 1 6
$

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/04/30/input-redirection-indicated-by-character/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>the  &gt;&#124;   construct</title>
		<link>http://www.beautifulwork.org/2013/04/29/the-construct/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-construct</link>
		<comments>http://www.beautifulwork.org/2013/04/29/the-construct/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 18:17:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Command Line Interface Language]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[nooclobber]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8372</guid>
		<description><![CDATA[knowledge representation $echo hello > bash.txt $set -o noclobber $echo hello > bash.txt bash: bash.txt: cannot overwrite existing file $echo hack > bash.txt bash: bash.txt: cannot overwrite existing file $echo hack >&#124; bash.txt $echo hack > bash.txt bash: bash.txt: cannot overwrite existing file $cat bash.txt hack $echo hacker >> bash.txt $cat bash.txt hack hacker $echo [...]]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$echo hello > bash.txt
$set -o noclobber
$echo hello > bash.txt
bash: bash.txt: cannot overwrite existing file
$echo hack > bash.txt
bash: bash.txt: cannot overwrite existing file
$echo hack >| bash.txt
$echo hack > bash.txt
bash: bash.txt: cannot overwrite existing file
$cat bash.txt 
hack
$echo hacker >>  bash.txt
$cat bash.txt 
hack
hacker
$echo hacker >  bash.txt
bash: bash.txt: cannot overwrite existing file
$cat bash.txt 
hack
hacker
$

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/04/29/the-construct/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash . set -o  noclobber  . environment manipulation</title>
		<link>http://www.beautifulwork.org/2013/04/27/bash-set-o-noclobber-environment-manipulation/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=bash-set-o-noclobber-environment-manipulation</link>
		<comments>http://www.beautifulwork.org/2013/04/27/bash-set-o-noclobber-environment-manipulation/#comments</comments>
		<pubDate>Sat, 27 Apr 2013 18:56:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[environment manipulation]]></category>
		<category><![CDATA[noclobber]]></category>
		<category><![CDATA[set]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8370</guid>
		<description><![CDATA[knowledge representation $set -o noclobber $ls a.out a.out $ls > a.out bash: a.out: cannot overwrite existing file $ $set +o noclobber $ $ls > a.out $rm a.out $]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$set -o noclobber
$ls a.out
a.out
$ls > a.out
bash: a.out: cannot overwrite existing file
$
$set +o noclobber
$
$ls > a.out
$rm a.out
$

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/04/27/bash-set-o-noclobber-environment-manipulation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>tput  Query Terminfo Database</title>
		<link>http://www.beautifulwork.org/2013/04/25/tput-query-terminfo-database/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=tput-query-terminfo-database</link>
		<comments>http://www.beautifulwork.org/2013/04/25/tput-query-terminfo-database/#comments</comments>
		<pubDate>Thu, 25 Apr 2013 17:22:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[database]]></category>
		<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[reset]]></category>
		<category><![CDATA[tput]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8366</guid>
		<description><![CDATA[knowledge representation $tput cup 3 4 $tput cup 4 3 $tput cols 140 $tput lines 39 $tput setb 4 $tput setb ` > ^C > ^C $^C $tput setb 0 $ $tput setb 1 $ $]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$tput cup 3 4


    $tput cup 4  3
   $tput cols
140
$tput lines
39
$tput setb  4
$tput setb  `
> ^C
> ^C
$^C
$tput setb 0
$
$tput setb 1
$
$

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/04/25/tput-query-terminfo-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grouping Output from several commands</title>
		<link>http://www.beautifulwork.org/2013/04/23/grouping-output-from-several-commands/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=grouping-output-from-several-commands</link>
		<comments>http://www.beautifulwork.org/2013/04/23/grouping-output-from-several-commands/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 19:14:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Intermediate]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating system]]></category>
		<category><![CDATA[grouping]]></category>
		<category><![CDATA[output]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8364</guid>
		<description><![CDATA[knowledge representation $cd autotest/ $ls autotest cyclictest ${ ls ; pwd ; cd cyclictest ; ls ; pwd } > /tmp/all.out > ^C ${ ls ; pwd ; cd cyclictest ; ls ; pwd ; } > /tmp/all.out $cat /tmp/all.out autotest cyclictest /home/jeffrin/autotest client.DEBUG /home/jeffrin/autotest/cyclictest $]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>        
$cd autotest/
$ls
autotest  cyclictest
${ ls ; pwd ; cd cyclictest ; ls ; pwd } > /tmp/all.out
> ^C
${ ls ; pwd ; cd cyclictest ; ls ; pwd ; } > /tmp/all.out
$cat /tmp/all.out 
autotest
cyclictest
/home/jeffrin/autotest
client.DEBUG
/home/jeffrin/autotest/cyclictest
$

</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/04/23/grouping-output-from-several-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Errors and Exceptions</title>
		<link>http://www.beautifulwork.org/2013/04/18/errors-and-exceptions/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=errors-and-exceptions</link>
		<comments>http://www.beautifulwork.org/2013/04/18/errors-and-exceptions/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 16:53:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Advanced]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[knowledge representation]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exception]]></category>

		<guid isPermaLink="false">http://www.beautifulwork.org/?p=8358</guid>
		<description><![CDATA[knowledge representation $gcc error.c $cat error.c #include main() { int a=0; int b=10; printf("Hello All\n"); printf("%d",b/a); } $./a.out > outputa Floating point exception $cat outputa $ $./a.out 2> outputa Hello All Floating point exception $./a.out > outputa Floating point exception $./a.out 2> outputb Hello All Floating point exception $./a.out &#038;> outputc Floating point exception $cat [...]]]></description>
				<content:encoded><![CDATA[<h4><u>knowledge representation</u></h4>
<pre>
$gcc error.c 
$cat error.c 
#include<stdio.h>

main()
{
int a=0;
int b=10;
printf("Hello All\n");
printf("%d",b/a);
}

$./a.out > outputa
Floating point exception
$cat outputa 
$
$./a.out 2> outputa
Hello All
Floating point exception
$./a.out > outputa
Floating point exception
$./a.out 2> outputb
Hello All
Floating point exception
$./a.out &#038;> outputc
Floating point exception
$cat outputa 
$
$cat outputb
$cat outputc 
$

</pre>
<p>An Error &#8220;indicates serious problems that a reasonable application should not try to catch.</p>
<p>An Exception &#8220;indicates conditions that a reasonable application might want to catch.</p>
<p>source : http://stackoverflow.com/questions/5813614/what-is-difference-between-errors-and-exceptions</p>
]]></content:encoded>
			<wfw:commentRss>http://www.beautifulwork.org/2013/04/18/errors-and-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
