<?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>EmbLogic &#187; Ankur Garg</title>
	<atom:link href="https://www.emblogic.com/blog/author/ankurg92/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.emblogic.com/blog</link>
	<description>Embedded System and ARM Training</description>
	<lastBuildDate>Tue, 03 Mar 2020 13:00:06 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Different methods of swapping 2 numbers</title>
		<link>https://www.emblogic.com/blog/09/different-methods-of-swapping-2-numbers/</link>
		<comments>https://www.emblogic.com/blog/09/different-methods-of-swapping-2-numbers/#comments</comments>
		<pubDate>Tue, 20 Sep 2016 15:10:38 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[arithmetic]]></category>
		<category><![CDATA[bitwise]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13684</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; void swap(int *,int *); int main() { int temp; int *t; int a=100,b=200; //Using 3 variables //1.1 temp = a; a = b; b = temp; printf(&#8220;%d %d\n&#8221;,a,b); //1.2 swap(&#38;a,&#38;b); printf(&#8220;%d %d\n&#8221;,a,b); //Using 2 variables //2.1 a += b; &#8230; <a href="https://www.emblogic.com/blog/09/different-methods-of-swapping-2-numbers/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />
void swap(int *,int *);</p>
<p>int main()<br />
{<br />
int temp;<br />
int *t;<br />
int a=100,b=200;<br />
//Using 3 variables<br />
//1.1<br />
temp = a;<br />
a = b;<br />
b = temp;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//1.2<br />
swap(&amp;a,&amp;b);<br />
printf(&#8220;%d %d\n&#8221;,a,b);</p>
<p>//Using 2 variables<br />
//2.1<br />
a += b;<br />
b = a-b;<br />
a = a-b;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//2.2<br />
if(a!=0 &amp;&amp; b!=0)<br />
{<br />
a *= b;<br />
b = a/b;<br />
a = a/b;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
}<br />
//2.3<br />
a = a^b;<br />
b = a^b;<br />
a = a^b;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//Using 2 variables in single step<br />
//3.1<br />
a = b+a-(b=a);<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//3.2<br />
a = b*a/(b=a);<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
//3.3<br />
a ^=b^=a^=b;<br />
printf(&#8220;%d %d\n&#8221;,a,b);<br />
return 0;<br />
}<br />
void swap(int *x,int *y)<br />
{<br />
int tmp;<br />
tmp = *x;<br />
*x = *y;<br />
*y = tmp;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/09/different-methods-of-swapping-2-numbers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Errors in &#8220;Hello World&#8221; program</title>
		<link>https://www.emblogic.com/blog/09/errors-in-hello-world-program/</link>
		<comments>https://www.emblogic.com/blog/09/errors-in-hello-world-program/#comments</comments>
		<pubDate>Mon, 19 Sep 2016 17:31:16 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[#1st program in c]]></category>
		<category><![CDATA[#errors]]></category>
		<category><![CDATA[#Hello World]]></category>
		<category><![CDATA[#Warnings]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13682</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; int main() { printf(&#8220;Hello World&#8221;); return 0; } /* Errors Line 1 :- *1. If u remove only preprocessor (#)-&#62;error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&#60;’ token *2.#nclude&#60;stdio.h&#62; -&#62;  error: invalid preprocessing directive #nclude *3. #include &#8230; <a href="https://www.emblogic.com/blog/09/errors-in-hello-world-program/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />
int main()<br />
{<br />
printf(&#8220;Hello World&#8221;);<br />
return 0;<br />
}<br />
/* Errors<br />
Line 1 :-<br />
*1. If u remove only preprocessor (#)-&gt;error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&lt;’ token<br />
*2.#nclude&lt;stdio.h&gt; -&gt;  error: invalid preprocessing directive #nclude<br />
*3. #include -&gt; error: #include expects &#8220;FILENAME&#8221; or &lt;FILENAME&gt;<br />
*4,5 #include&lt;  -&gt; error: missing terminating &gt; character<br />
#include&lt;&gt;    error: empty filename in #include<br />
#include&lt;stdio.h  -&gt; 4th error<br />
*6. #include&lt;stdio&gt; -&gt; fatal error: stdio: No such file or directory</p>
<p>Line 2 :-<br />
*7. int main(  -&gt; error: expected declaration specifiers or ‘&#8230;’ before ‘{’ token<br />
*8. int main   -&gt; error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token<br />
*9. in main()  -&gt; error: unknown type name ‘in’<br />
*10. int main(*) -&gt; error: expected declaration specifiers or ‘&#8230;’ before ‘*’ token<br />
*11. int main(&#8216;) -&gt;  error: missing terminating &#8216; character<br />
*12. If no main() -&gt; error: expected identifier or ‘(’ before ‘{’ token</p>
<p>Line 3 :-<br />
*13. if no {  -&gt; error: expected declaration specifiers before ‘printf’<br />
error: expected declaration specifiers before ‘return’<br />
error: expected declaration specifiers before ‘}’ token<br />
*14. ..{  -&gt; error: expected ‘{’ at end of input<br />
*15. {..  -&gt; error: expected expression before ‘.’ token</p>
<p>Line 4 :-<br />
*16. printf(&#8220;Hello World&#8221;). -&gt; error: expected identifier before ‘return’<br />
*17. printf(&#8220;Hello World&#8221;) -&gt; error: expected ; before ‘return’<br />
*18. printf(&#8220;Hello World&#8221;) -&gt; error: expected ‘)’ before ‘;’ token<br />
error: expected ‘;’ before ‘}’ token<br />
*19. print(&#8220;Hello World&#8221;)  -&gt; undefined reference to `print&#8217;<br />
*20. print(Hello World)  -&gt; error: ‘Hello’ undeclared (first use in this function)<br />
*21. print(&#8220;Hello World)  -&gt; warning: missing terminating &#8221; character [enabled by default]<br />
error: missing terminating &#8221; character<br />
error: expected expression before ‘return’<br />
error: expected ‘;’ before ‘}’ token<br />
Line 5 :-<br />
*22. return c; -&gt; error: ‘c’ undeclared (first use in this function)<br />
Line 6 :-<br />
*23. missing } -&gt; error: expected declaration or statement at end of inpu</p>
<p>*/</p>
<p>/* Warnings</p>
<p>w1. If u remove header -&gt; warning: incompatible implicit declaration of built-in function ‘printf’<br />
*w2. #include&lt;stdio.h&gt; -&gt; warning: extra tokens at end of #include directive [enabled by default]<br />
*w3. return NULL       -&gt; warning: return makes integer from pointer without a cast</p>
<p>*/ Special Case :-<br />
/* ; -&gt; You can freely put ; or ;; anywhere in main (before fn., after fn., blank line etc.)<br />
*      Except you can&#8217;t put ; after main();<br />
*      ;int main() -&gt; Valid<br />
*      {; -&gt;         Valid<br />
*      }; -&gt;         Valid<br />
*      printf(&#8220;Hello World&#8221;);; -&gt; Valid<br />
*    Shows warning if used after #include&lt;stdio.h&gt;;<br />
*/</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/09/errors-in-hello-world-program/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Character Driver?</title>
		<link>https://www.emblogic.com/blog/02/what-is-character-driver/</link>
		<comments>https://www.emblogic.com/blog/02/what-is-character-driver/#comments</comments>
		<pubDate>Sun, 21 Feb 2016 12:10:16 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Character Driver]]></category>
		<category><![CDATA[char driver]]></category>
		<category><![CDATA[Character Device Driver]]></category>
		<category><![CDATA[driver]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13296</guid>
		<description><![CDATA[A character device driver is one that transfers data directly to and from a user process. This is the most common type of device driver and there are plenty of simple examples in the source tree. Character device drivers may &#8230; <a href="https://www.emblogic.com/blog/02/what-is-character-driver/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">A character device driver is one that transfers data directly to and from a user process. </span></span></span></p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">This is the most common type of device driver and there are plenty of simple examples in the source tree.</span></span></span></p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">Character device drivers may transfer data between a user-level process and the device using any scheme other than the system buffer cache. </span></span></span></p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">Character drivers control devices such as :-</span></span></span></p>
<p>&nbsp;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">* network cards</span></span></span></p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">* terminal devices</span></span></span></p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">* printers</span></span></span></p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">* specialized devices such as robots</span></span></span></p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">* medical devices</span></span></span></p>
<p><span style="font-family: times new roman,times,serif"><span style="color: #333333"><span style="font-size: 14px">* retail sales devices.</span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/what-is-character-driver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ls &#8211; list command</title>
		<link>https://www.emblogic.com/blog/02/ls-list-command/</link>
		<comments>https://www.emblogic.com/blog/02/ls-list-command/#comments</comments>
		<pubDate>Wed, 10 Feb 2016 17:20:32 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[ll]]></category>
		<category><![CDATA[long list]]></category>
		<category><![CDATA[ls]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell scripting]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13262</guid>
		<description><![CDATA[ls &#8211; list command ================= - ls means list directory content - Prototype : ls [OPTION] &#8230; [FILE] &#8230; - Exit status It returns 0 ,on success Returns 1 in case of minor problems (eg. cannot access subdirectory) returns 2 &#8230; <a href="https://www.emblogic.com/blog/02/ls-list-command/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>ls &#8211; list command<br />
=================<br />
- ls means list directory content<br />
- Prototype :<br />
ls [OPTION] &#8230; [FILE] &#8230;<br />
- Exit status<br />
It returns 0 ,on success<br />
Returns 1 in case of minor problems (eg. cannot access subdirectory)<br />
returns 2 in case of serious trouble (eg. Cannot access command line argument)<br />
- For specific listing you can use *<br />
eg.1) For listing all files starting with a use :<br />
ls a*<br />
2) for listing all .c files use :<br />
ls *.c<br />
3) for listing all .c files starting with a use :<br />
ls a*.c<br />
- Some common options are :<br />
i) -a &#8211;all &#8211;&gt; Do not ignore enteries starting with .<br />
Use this to view swap or temporary files.<br />
ii) -l &#8211;&gt; long listing format<br />
iii) -r &#8211;) Reverse order sort (by name) and list<br />
iv) -s &#8211;size &#8211;&gt; Print allocated size of each file in blocks<br />
v) -S &#8211;&gt; Sort by file size<br />
vi) -t &#8211;&gt; Sort by modification time, newest first<br />
vii) -U &#8211;&gt; Do not sort; list enteries in directory order<br />
viii) -X &#8211;&gt; Sort alphabetically by entry extension.<br />
ix) -F &#8211;&gt; to distinguish files from directories (Puts / in directory and * with executable files)<br />
x) -R &#8211;&gt; It shows files that are contained in directory. It continued to dirrectory in a directory and so on.</p>
<p>- In fedora for long lsting use command :</p>
<p>ll</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/ls-list-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CD &#8211; Change Directory Command</title>
		<link>https://www.emblogic.com/blog/02/cd-change-directory-command/</link>
		<comments>https://www.emblogic.com/blog/02/cd-change-directory-command/#comments</comments>
		<pubDate>Wed, 10 Feb 2016 17:18:28 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cd]]></category>
		<category><![CDATA[change directory]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora linux]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13260</guid>
		<description><![CDATA[CD &#8211; Change Directory Command ============================= - cd means change working directory - Prototype: cd [-L &#124; -P] [directory] cd - -If you do not give any directory to cd command, it will take you to home directory. eg. cd &#8230; <a href="https://www.emblogic.com/blog/02/cd-change-directory-command/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>CD &#8211; Change Directory Command<br />
=============================<br />
- cd means change working directory<br />
- Prototype:<br />
cd [-L | -P] [directory]<br />
cd -<br />
-If you do not give any directory to cd command, it will take you to home directory.<br />
eg. cd &#8211;&gt; It will go to home directory.<br />
- For previous directory use :<br />
cd ..<br />
- Further for more than one previous directory use :<br />
cd ../..<br />
- Directory can be defined by 2 types :<br />
i) Absolute filepath &#8211; Path starting from &#8216;/&#8217;.<br />
eg. cd /usr/bin/<br />
ii)Relative Filepath &#8211; Path relative to current directory<br />
eg. cd /usr &#8211;&gt; Absolute filepath<br />
cd etc &#8211;&gt; Relative Filepath</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/cd-change-directory-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Common linux virtual directories</title>
		<link>https://www.emblogic.com/blog/02/common-linux-virtual-directories/</link>
		<comments>https://www.emblogic.com/blog/02/common-linux-virtual-directories/#comments</comments>
		<pubDate>Tue, 09 Feb 2016 15:00:57 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[/home]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[directories]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[virtual directories]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13258</guid>
		<description><![CDATA[Common Linux Virtual Directories ================================= Directory               Usage / Root                     of virtual directory. No files are placed here (normally) /bin         &#8230; <a href="https://www.emblogic.com/blog/02/common-linux-virtual-directories/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Common Linux Virtual Directories<br />
=================================<br />
Directory               Usage<br />
/ Root                     of virtual directory. No files are placed here (normally)<br />
/bin                         Binary directory.GNU user level utilities are stored<br />
/boot                       Boot directory.Boot files are stored here<br />
/dev                         device directory, where linux creates device nodes<br />
/etc                          system configuration files directory<br />
/home                      home directory, user directories are placed here<br />
/lib                          System &amp; application library files are stored here<br />
/media                   Common place for mount point of removable media<br />
/mnt                        mount directory, for removable devices<br />
/opt                         used to store optional software packages<br />
/root                       home directory of root user<br />
/sbin                      GNU admin level utilities are store here<br />
/tmp                       Temporary work files are created and destroyed<br />
/usr                        User installed softwares directory<br />
/var                         For frequently changing directory ,such as log files</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/common-linux-virtual-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Filesystem</title>
		<link>https://www.emblogic.com/blog/02/linux-filesystem/</link>
		<comments>https://www.emblogic.com/blog/02/linux-filesystem/#comments</comments>
		<pubDate>Tue, 09 Feb 2016 14:56:41 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13255</guid>
		<description><![CDATA[Linux Filesystem ================ - In windows, physical drive determines the pathname of the file. - Windows assigns a letter to each disk drive. - Each directory contains its own directory structure for accesing files stored in it. - For eg. &#8230; <a href="https://www.emblogic.com/blog/02/linux-filesystem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Linux Filesystem<br />
================<br />
- In windows, physical drive determines the pathname of the file.<br />
- Windows assigns a letter to each disk drive.<br />
- Each directory contains its own directory structure for accesing files stored in it.<br />
- For eg. in windows filepath is as:<br />
c:\Users\ankur\Documents\Lessons.doc</p>
<p>- Linux does not use drive letters in pathnames like windows.<br />
- Linux stores files within a single directory structure, called a virtual directory.<br />
- Virtual directory contains filepaths from all storage devices installed on PC, mergedinto a single directory.<br />
- There is a single base directory, called the root.<br />
- root drive contains core of virtual directory.<br />
- On root drive, Linux has special directories called mount points.<br />
-When we start a new shell prompt, your session starts in your home directory.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/linux-filesystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get help in Linux &#8211; Fedora</title>
		<link>https://www.emblogic.com/blog/02/how-to-get-help-in-linux-fedora/</link>
		<comments>https://www.emblogic.com/blog/02/how-to-get-help-in-linux-fedora/#comments</comments>
		<pubDate>Tue, 09 Feb 2016 14:54:58 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[info]]></category>
		<category><![CDATA[info page]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[man]]></category>
		<category><![CDATA[man page]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13253</guid>
		<description><![CDATA[To get help in fedora ===================== To learn about any new command, function or utility in Fedora we can get help from it. It has 3 such commands :- i) man pages &#8211; These are manual pages . - It &#8230; <a href="https://www.emblogic.com/blog/02/how-to-get-help-in-linux-fedora/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>To get help in fedora<br />
=====================<br />
To learn about any new command, function or utility in Fedora we can get help from it.<br />
It has 3 such commands :-</p>
<p>i) man pages &#8211; These are manual pages .<br />
- It contains interface to online reference manuals<br />
- Press q to exit.<br />
- How to Use ( Command ) &#8211; man command_name<br />
- for all man pages of BASH shell, use<br />
man bash<br />
- It generally contains following information about command(command_name) :-<br />
* Name<br />
* Synopsis (Prototype)<br />
* Description (Options)<br />
* Author (author of command)<br />
* Reporting Bugs (Feedback emails/Website)<br />
* Copyright (copyright details)<br />
* See Also (for further reference of command)</p>
<p>ii) Info pages &#8211; Read info documents<br />
- It contains BASH manuals.<br />
- Press q to exit<br />
- How to Use (command) &#8211; info command_name<br />
- It contains information about :-<br />
* Prototype<br />
* Introduction<br />
* Options<br />
* Exit Status<br />
iii) help command<br />
- It gives basic help for using a command and its various options.<br />
- It gives output on Standard Output.<br />
- It do not require exit command.<br />
- How to Use (command) &#8211; help command_name<br />
- It contains following information about command (command_name) :-<br />
* Function of command<br />
* Options<br />
* Exit status</p>
<p>eg.<br />
man echo<br />
info echo<br />
help echo</p>
<p>- To check total no. of enteries in each of three<br />
I) type either of three (with space at end)<br />
II) Press tab button for 3-4 times.<br />
We will get the total number of possible options defined or list of them also.<br />
eg. (&lt;tab&gt; means Press tab button)<br />
man &lt;tab&gt;&lt;tab&gt;&lt;tab&gt;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/how-to-get-help-in-linux-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change default prompt in BASH shell</title>
		<link>https://www.emblogic.com/blog/02/how-to-change-default-prompt-in-bash-shell/</link>
		<comments>https://www.emblogic.com/blog/02/how-to-change-default-prompt-in-bash-shell/#comments</comments>
		<pubDate>Sun, 07 Feb 2016 15:46:40 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[change default prompt]]></category>
		<category><![CDATA[default prompt]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PS1]]></category>
		<category><![CDATA[PS2]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell scripting]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13238</guid>
		<description><![CDATA[To change default prompt :- ======================== - We can change default prompt by assigning the character to it. - Each character have a specific meaning. BASH Shell Prompt Characters :- Character Description \a Bell Character \d Date in format &#8220;Day &#8230; <a href="https://www.emblogic.com/blog/02/how-to-change-default-prompt-in-bash-shell/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>To change default prompt :-<br />
========================<br />
- We can change default prompt by assigning the character to it.<br />
- Each character have a specific meaning.</p>
<p>BASH Shell Prompt Characters :-<br />
Character Description<br />
\a Bell Character<br />
\d Date in format &#8220;Day Month Date&#8221;<br />
\e ASCII escape character<br />
\h Local hostname<br />
\H Fully qualified domain hostname<br />
\j Number of jobs currently managed by the shell<br />
\l Basename of the shell&#8217;s terminal device name<br />
\n ASCII newline character<br />
\r ASCII carriage return<br />
\s Name of the shell<br />
\t Current time in 24-hour HH:MM:SS format<br />
\T Current time in 12-hour HH:MM:SS format<br />
\@ Current time in 12-hour am/pm format<br />
\u Username of current user<br />
\v Version of BASH shell<br />
\V Release level of bash shell<br />
\w Current working directory<br />
\W Basename of current working directory<br />
\# Command number of this command<br />
\$ A dollar sign if normal user, #(Pound) for root user<br />
/nnn Character corresponding to value nnn<br />
\\ Backslash<br />
\[ Begins a control code sequence<br />
/] Ends a control code sequence</p>
<p>eg.<br />
[ankur@(none) ~]$ PS1 = &#8220;[\t][\u]$&#8221;<br />
[15:20:30][ankur]$</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/how-to-change-default-prompt-in-bash-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Command line Prompt &#8211; PS1, PS2</title>
		<link>https://www.emblogic.com/blog/02/command-line-prompt-ps1-ps2/</link>
		<comments>https://www.emblogic.com/blog/02/command-line-prompt-ps1-ps2/#comments</comments>
		<pubDate>Sun, 07 Feb 2016 15:44:42 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[command line prompt]]></category>
		<category><![CDATA[environmental variables]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[PS1]]></category>
		<category><![CDATA[PS2]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[shell scripting]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13236</guid>
		<description><![CDATA[Command line Prompt =================== Environmental variables that controls Command line Prompt PS1 : Controls the format of default command line prompt. PS2 : Controls the format of second-tier command line prompt. PS3 : Controls the format of tertiary command line &#8230; <a href="https://www.emblogic.com/blog/02/command-line-prompt-ps1-ps2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Command line Prompt<br />
===================<br />
Environmental variables that controls Command line Prompt<br />
PS1 : Controls the format of default command line prompt.<br />
PS2 : Controls the format of second-tier command line prompt.<br />
PS3 : Controls the format of tertiary command line prompt.</p>
<p>- Shell uses default PS1 prompt for initial data entry into shell.<br />
- If we enter a command that requires additional information, shell displays second-tier prompt specified by PS2 .<br />
- To display current settings for prompt use command :<br />
echo $PS1<br />
echo $PS2<br />
- PS3 is used only in shell scripts.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/command-line-prompt-ps1-ps2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Run Levels</title>
		<link>https://www.emblogic.com/blog/02/linux-run-levels/</link>
		<comments>https://www.emblogic.com/blog/02/linux-run-levels/#comments</comments>
		<pubDate>Tue, 02 Feb 2016 12:36:51 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[run level]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13216</guid>
		<description><![CDATA[Linux Run Levels ================ Run Level    Description 0                    Halt 1                     Single-User mode 2                    Multi-user mode, usually &#8230; <a href="https://www.emblogic.com/blog/02/linux-run-levels/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Linux Run Levels<br />
================<br />
Run Level    Description<br />
0                    Halt<br />
1                     Single-User mode<br />
2                    Multi-user mode, usually without networking support<br />
3                    Full multi-user mode with networking<br />
4                    Unused<br />
5                    Multiuser mode with networking and a graphical X window Session<br />
6                    Reboot</p>
<p>- To change run level use init command</p>
<p>init run_level<br />
- Most normal is run level 5 for graphical linux system.<br />
- Level 1 is used for troubleshooting or emergency purpose.<br />
- Most linux softwares start the network softwares at run level 3.<br />
- What aplications work at Run level is determined by system by RC script.</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/linux-run-levels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boot process of linux</title>
		<link>https://www.emblogic.com/blog/02/boot-process-of-linux/</link>
		<comments>https://www.emblogic.com/blog/02/boot-process-of-linux/#comments</comments>
		<pubDate>Tue, 02 Feb 2016 12:27:09 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[boot]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13214</guid>
		<description><![CDATA[The boot process of linux ========================= - After you turn on your Linux System, linux kernel loads into memory and runs. - Firstly, it runs the init process. - init program is usually located at /sbin/init. - init process has &#8230; <a href="https://www.emblogic.com/blog/02/boot-process-of-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>The boot process of linux<br />
=========================<br />
- After you turn on your Linux System, linux kernel loads into memory and runs.<br />
- Firstly, it runs the init process.<br />
- init program is usually located at /sbin/init.<br />
- init process has PID 1.<br />
- The init process then starts all other processes.<br />
- The init process reads the /etc/inittab file during boot (This is outdated now).</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/02/boot-process-of-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sockets &#8211; Basics</title>
		<link>https://www.emblogic.com/blog/01/sockets-basics/</link>
		<comments>https://www.emblogic.com/blog/01/sockets-basics/#comments</comments>
		<pubDate>Sun, 31 Jan 2016 09:29:56 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Project 04: FTP based Client Server using Threads and Sockets]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[client-server]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[sockets]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13210</guid>
		<description><![CDATA[Sockets ======= A socket is a communication mechanism that allows client/server systems to be developed either locally,on a single machine, or across networks. - It is a communication mechanism - It allows client/server systems to developed either locally or across &#8230; <a href="https://www.emblogic.com/blog/01/sockets-basics/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Sockets<br />
=======<br />
A socket is a communication mechanism that allows client/server systems to be developed either locally,on a single machine, or across networks.<br />
- It is a communication mechanism<br />
- It allows client/server systems to developed either locally or across a network.<br />
- Socket is an extension of pipe<br />
- They make clear distinction between client and server.<br />
- Socket can be named or unnamed.<br />
- They make clear distinction between server and client.<br />
- In a socket, one side is client/server for read/write/both and other side is a network interface.</p>
<p>There are 6 tasks in a socket :-<br />
1. Create Socket.<br />
2. Give name to socket.<br />
3. Listen to socket for incoming connection.<br />
4. Coonect the client to server.<br />
5. Accept the request by server from client.<br />
6. Close the socket</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/sockets-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>fgets &#8211; scanning string with spaces</title>
		<link>https://www.emblogic.com/blog/01/fgets-scanning-string-with-spaces/</link>
		<comments>https://www.emblogic.com/blog/01/fgets-scanning-string-with-spaces/#comments</comments>
		<pubDate>Sun, 24 Jan 2016 09:55:21 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fgets]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13188</guid>
		<description><![CDATA[Prototype : - #include &#60;stdio.h&#62; char *fgets(char *s, int size, FILE *stream); Defination :- fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s.  Reading  stops  after an &#8230; <a href="https://www.emblogic.com/blog/01/fgets-scanning-string-with-spaces/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Prototype : -</p>
<p>#include &lt;stdio.h&gt;</p>
<p>char *fgets(char *s, int size, FILE *stream);</p>
<p>Defination :-</p>
<p>fgets() reads in at most one less than size characters from stream and stores them into the buffer pointed to by s.  Reading  stops  after an EOF or a newline.  If a newline is read, it is stored into the buffer.  A terminating null byte (&#8221;) is stored after the last charac?<br />
ter in the buffer.<br />
Use :-</p>
<p>It is used to scan a string with spaces until a new line character or EOF character is inserted.</p>
<p>It takes input until enter is pressed.</p>
<p>It is used in place of scanf();</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/fgets-scanning-string-with-spaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bubble sorting using function</title>
		<link>https://www.emblogic.com/blog/01/bubble-sorting-using-function/</link>
		<comments>https://www.emblogic.com/blog/01/bubble-sorting-using-function/#comments</comments>
		<pubDate>Sat, 23 Jan 2016 06:00:50 +0000</pubDate>
		<dc:creator><![CDATA[Ankur Garg]]></dc:creator>
				<category><![CDATA[Data Structures with C]]></category>
		<category><![CDATA[bubble sorting]]></category>
		<category><![CDATA[c programming]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[sorting]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.emblogic.com/blog/?p=13184</guid>
		<description><![CDATA[#include&#60;stdio.h&#62; //Program for Bubble Sorting int * bubblesort(int*,int); int display(int *,int); int main() { int i,j,a[100],N,temp; printf(&#8220;Enter no.of elements you want to sort:\t&#8221;); scanf(&#8220;%d&#8221;,&#38;N);//Max. no. of elements printf(&#8220;Enter %d elements you want to sort:\n&#8221;,N); for(i=0;i&#60;N;i++) scanf(&#8220;%d&#8221;,(a+i)); printf(&#8220;\nBefore sorting:\t&#8221;); display(a,N); //Sorting &#8230; <a href="https://www.emblogic.com/blog/01/bubble-sorting-using-function/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>#include&lt;stdio.h&gt;<br />
//Program for Bubble Sorting<br />
int * bubblesort(int*,int);<br />
int display(int *,int);<br />
int main()<br />
{<br />
int i,j,a[100],N,temp;</p>
<p>printf(&#8220;Enter no.of elements you want to sort:\t&#8221;);<br />
scanf(&#8220;%d&#8221;,&amp;N);//Max. no. of elements<br />
printf(&#8220;Enter %d elements you want to sort:\n&#8221;,N);<br />
for(i=0;i&lt;N;i++)<br />
scanf(&#8220;%d&#8221;,(a+i));<br />
printf(&#8220;\nBefore sorting:\t&#8221;);<br />
display(a,N);<br />
//Sorting Starts<br />
bubblesort(a,N);<br />
//Sorting Ends<br />
printf(&#8220;\nAfter sorting:\t&#8221;);<br />
display(a,N);<br />
}</p>
<p>int * bubblesort(int *a,int N)<br />
{<br />
int i,j,temp;<br />
for(i=0;i&lt;N-1;i++)<br />
for(j=0;j&lt;N-i-1;j++)<br />
if(a[j]&gt;a[j+1])<br />
{<br />
temp = a[j];<br />
a[j]=a[j+1];<br />
a[j+1]=temp;<br />
}<br />
return a;</p>
<p>}<br />
int display(int* a,int N)<br />
{<br />
int i;<br />
for(i=0;i&lt;N;i++)<br />
printf(&#8220;%d\t&#8221;,*(a+i));</p>
<p>return 0;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/01/bubble-sorting-using-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
