<?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; shell scripting</title>
	<atom:link href="https://www.emblogic.com/blog/tag/shell-scripting/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>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>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>scripting problem</title>
		<link>https://www.emblogic.com/blog/03/scripting-problem/</link>
		<comments>https://www.emblogic.com/blog/03/scripting-problem/#comments</comments>
		<pubDate>Fri, 30 Mar 2012 15:02:20 +0000</pubDate>
		<dc:creator><![CDATA[saurabh.aggarwal]]></dc:creator>
				<category><![CDATA[Shell Scripts]]></category>
		<category><![CDATA[makefile]]></category>
		<category><![CDATA[shell scripting]]></category>

		<guid isPermaLink="false">http://emblogic.org/blog/?p=2302</guid>
		<description><![CDATA[I am trying to make a Makefile which can accept an a c file name as an argument to be used as a variable in my script so that i can use it with any of my c files for &#8230; <a href="https://www.emblogic.com/blog/03/scripting-problem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I am trying to make a Makefile which can accept an a c file name as an argument to be used as a variable in my script so that i can use it with any of my c files for compilation .<br />
the content of Makefile as follows..</p>
<p>#!/bin/bash</p>
<p>x=$1<br />
exec: ${x}.o<br />
gcc -o exec ${x}.o<br />
${x}.o: ${x}.c<br />
gcc -c ${x}.o ${x}.c</p>
<p>it is not executing properly as the final executable file is not exec but the with the same name as that of the c file name..i think its using the default makefile to create the executable file .<br />
am i doing it right ?????what is the right make command (to be given) to execute this script&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>https://www.emblogic.com/blog/03/scripting-problem/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
