<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4790490757462136417</id><updated>2026-03-13T00:52:07.234-07:00</updated><title type='text'>Unix Shell Scripts</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-8453542111902040767</id><published>2011-06-07T06:00:00.001-07:00</published><updated>2011-06-07T06:00:16.129-07:00</updated><title type='text'>Wishing Thanks to My Readers.</title><content type='html'>&lt;p&gt;&lt;em&gt;Hi reader’s,&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I’m very much happy to see that lot of people from across the globe visited my blog and visitor’s count has crossed 3000 + with in 40 days of starting the blog. I would request my readers to start posting your valuable comments and requests so that I can make the blog more informative &amp;amp;&amp;#160; interactive . For viewers information who visit my Informatica blog, to visit my SQL or Data warehousing blogs too as I spent a lot of time posting the information, which is very useful for the job seekers or Data warehousing professionals in your day today activities at work or can also be used as the quick reference guide before taking up any interview.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I’m planning to publish a book on informatica soon which will cover all major concepts of the data warehousing in detail, including the SQL concepts used by an ETL consultants, Basic Unix Commands and Introduction to the Scheduler tools like Autosys, Tivoli and off course Informatica with simple examples.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;I would highly appreciate if few people come forward and post the interview questions or the scenarios which they have encountered in there day to day work for discussion at the discussion board.&lt;/em&gt;&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/8453542111902040767/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/06/wishing-thanks-to-my-readers.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/8453542111902040767'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/8453542111902040767'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/06/wishing-thanks-to-my-readers.html' title='Wishing Thanks to My Readers.'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-5730050110317334819</id><published>2011-04-23T03:03:00.001-07:00</published><updated>2011-04-23T03:04:30.928-07:00</updated><title type='text'>Regular Expressions</title><content type='html'>&lt;p&gt;&lt;b&gt;What Are Regular Expressions?&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;A regular expression is a pattern template you define that a Linux utility Uses to filter text. A Linux utility (such as the sed editor or the gawk program)matches the regular expression pattern against data as that data flows Into the utility. If the data matches the pattern, it’s accepted for processing.&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; If the data doesn’t match the pattern, it’s rejected. The regular expression pattern makes use of wildcard characters to represent one or more characters in the data stream.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Types of regular expressions:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;There are two popular regular expression engines:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt; The POSIX Basic Regular Expression (BRE) engine&lt;/li&gt;    &lt;li&gt; The POSIX Extended Regular Expression (ERE) engine&lt;b&gt;&lt;/b&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;b&gt;Defining BRE Patterns: &lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The most basic BRE pattern is matching text characters in a data stream.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Eg 1:&lt;/b&gt; &lt;b&gt;Plain text&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;This is a test&amp;quot; | sed -n ’/test/p’&lt;/p&gt;  &lt;p&gt;This is a test.&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;This is a test&amp;quot; | sed -n ’/trial/p’&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;This is a test&amp;quot; | gawk ’/test/{print $0}’&lt;/p&gt;  &lt;p&gt;This is a test.&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;This is a test&amp;quot; | gawk ’/trial/{print $0}’&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Eg 2: &lt;/b&gt;&lt;b&gt;Special characters&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The special characters recognized by regular expressions are:&lt;/p&gt;  &lt;p&gt;.*[]^${}\+?|()&lt;/p&gt;  &lt;p&gt;For example, if you want to search for a dollar sign in your text, just precede it with a backslash character:&lt;/p&gt;  &lt;p&gt;$ cat data2&lt;/p&gt;  &lt;p&gt;The cost is $4.00&lt;/p&gt;  &lt;p&gt;$ sed -n ’/\$/p’ data2&lt;/p&gt;  &lt;p&gt;The cost is $4.00&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Eg 3: &lt;/b&gt;&lt;b&gt;Looking for the ending&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The dollar sign ($) special character defines the end anchor.&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;This is a good book&amp;quot; | sed -n ’/book$/p’&lt;/p&gt;  &lt;p&gt;This is a good book&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;This book is good&amp;quot; | sed -n ’/book$/p’&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Eg 4:&lt;/b&gt; &lt;b&gt;Using ranges&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;You can use a range of characters within a character class by using the dash symbol.&lt;/p&gt;  &lt;p&gt;Now you can simplify the zip code example by specifying a range of digits:&lt;/p&gt;  &lt;p&gt;$ sed -n ’/^[0-9][0-9][0-9][0-9][0-9]$/p’ data8&lt;/p&gt;  &lt;p&gt;60633&lt;/p&gt;  &lt;p&gt;46201&lt;/p&gt;  &lt;p&gt;45902&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Extended Regular Expressions:&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The POSIX ERE patterns include a few additional symbols that are used by some Linux applications and utilities. The gawk program recognizes the ERE patterns, but the sed editor doesn’t.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Eg 1: The question mark&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The question mark indicates that the preceding character can appear zero or one time, but that’s all. It doesn’t match repeating occurrences of the character:&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;bt&amp;quot; | gawk ’/be?t/{print $0}’&lt;/p&gt;  &lt;p&gt;bt&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;bet&amp;quot; | gawk ’/be?t/{print $0}’&lt;/p&gt;  &lt;p&gt;Bet&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;beet&amp;quot; | gawk ’/be?t/{print $0}’&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;beeet&amp;quot; | gawk ’/be?t/{print $0}’&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Eg 2: &lt;/b&gt;&lt;b&gt;The plus sign&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The plus sign indicates that the preceding character can appear one ormore times, but must be present at least once. The pattern doesn’t match if the character is not present:&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;beeet&amp;quot; | gawk ’/be+t/{print $0}’&lt;/p&gt;  &lt;p&gt;beeet&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;beet&amp;quot; | gawk ’/be+t/{print $0}’&lt;/p&gt;  &lt;p&gt;beet&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;bet&amp;quot; | gawk ’/be+t/{print $0}’&lt;/p&gt;  &lt;p&gt;bet&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;bt&amp;quot; | gawk ’/be+t/{print $0}’&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Eg 3: &lt;/b&gt;&lt;b&gt;The pipe symbol&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The pipe symbol allows to you to specify two or more patterns that the regular expression engine uses in a logical OR formula when examining the data stream. If any of the patterns match the data stream text, the text passes. If none of the patterns match, the data stream text fails.&lt;/p&gt;  &lt;p&gt;The format for using the pipe symbol is:&lt;/p&gt;  &lt;p&gt;&lt;i&gt;expr1&lt;/i&gt;|expr2|...&lt;/p&gt;  &lt;p&gt;Here’s an example of this:&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;The cat is asleep&amp;quot; | gawk ’/cat|dog/{print $0}’&lt;/p&gt;  &lt;p&gt;The cat is asleep&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;The dog is asleep&amp;quot; | gawk ’/cat|dog/{print $0}’&lt;/p&gt;  &lt;p&gt;The dog is asleep&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;The sheep is asleep&amp;quot; | gawk ’/cat|dog/{print $0}’&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Eg 4: Grouping expressions&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;When you group a regular expression pattern, the group is treated like a standard character. You can apply a special character to the group just as you would to a regular character.&lt;/p&gt;  &lt;p&gt;For example:&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;Sat&amp;quot; | gawk ’/Sat(urday)?/{print $0}’&lt;/p&gt;  &lt;p&gt;Sat&lt;/p&gt;  &lt;p&gt;$ echo &amp;quot;Saturday&amp;quot; | gawk ’/Sat(urday)?/{print $0}’&lt;/p&gt;  &lt;p&gt;Saturday&lt;/p&gt;  &lt;p&gt;$&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/5730050110317334819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/regular-expressions.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/5730050110317334819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/5730050110317334819'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/regular-expressions.html' title='Regular Expressions'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-3280428037267552494</id><published>2011-04-22T22:02:00.001-07:00</published><updated>2011-04-22T22:02:35.886-07:00</updated><title type='text'>Automated FTP File Transfer</title><content type='html'>&lt;p&gt;&lt;strong&gt; Automated FTP File Transfer :&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;You can use a here document to script an FTP file transfer. The basic idea is shown here.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;ftp -i -v -n wilma &amp;lt;&amp;lt;END_FTP    &lt;br /&gt;user randy mypassword    &lt;br /&gt;binary    &lt;br /&gt;lcd /scripts/download    &lt;br /&gt;cd /scripts    &lt;br /&gt;get auto_ftp_xfer.ksh    &lt;br /&gt;bye    &lt;br /&gt;END_FTP&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/3280428037267552494/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/automated-ftp-file-transfer.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/3280428037267552494'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/3280428037267552494'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/automated-ftp-file-transfer.html' title='Automated FTP File Transfer'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-6710975854355257651</id><published>2011-04-22T21:49:00.001-07:00</published><updated>2011-04-22T21:49:52.797-07:00</updated><title type='text'>Process a File line by line</title><content type='html'>&lt;p&gt;&lt;strong&gt; Process a File line by line :&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt; There are Numerous methods to achieve the same one such method is discussed here :&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Method 1: &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Let’s start with the most common method that I see, which is catting a file and piping the file output to a while read loop. On each loop iteration a single line of text is read into a variable named LINE. This continuous loop will run until all of the lines in the file have been processed one at a time.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; The pipe is the key to the popularity of this method. It is intuitively obvious that the output from the previous command in the pipe is used as input to the next command in the pipe. As an example, if I execute the df command to list file system statistics and it scrolls across the screen out of view, I can use a pipe to send the output to the more command, as in the following command:&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;&lt;font size=&quot;3&quot;&gt;df | more&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size=&quot;3&quot;&gt;&lt;/font&gt;&lt;/strong&gt;    &lt;br /&gt;When the df command is executed, the pipe stores the output in a temporary system file. Then this temporary system file is used as input to the more command, allowing me to view the df command output one page/line at a time. Our use of piping output to a while loop works the same way; the output of the cat command is used as input to the while loop and is read into the LINE variable on each loop iteration. Look at the    &lt;br /&gt;complete function in Listing 2.2.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;function while_read_LINE     &lt;br /&gt;{      &lt;br /&gt;cat $FILENAME | while read LINE      &lt;br /&gt;do      &lt;br /&gt;echo “$LINE”      &lt;br /&gt;:      &lt;br /&gt;done      &lt;br /&gt;}&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Each of these test loops is created as a function so that we can time each method using the shell script. You could also use () C-type function definition if you wanted, as shown in Listing 2.3.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;&lt;strong&gt;while_read_LINE ()     &lt;br /&gt;{      &lt;br /&gt;cat $FILENAME | while read LINE      &lt;br /&gt;do      &lt;br /&gt;echo “$LINE”      &lt;br /&gt;:      &lt;br /&gt;done      &lt;br /&gt;}&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;Whether you use the function or () technique, you get the same result. I tend to use the function method more often so that when someone edits the script they will know the block of code is a function. For beginners, the word “function” helps understanding the whole shell script a lot. The $FILENAME variable is set in the main body of the shell script. Within the while loop notice that I added the no-op (:) after the echo statement. A no-op (:) does nothing, but it always has a 0, zero, return code. I use the no-op only as a placeholder so that you can cut the function code out and paste it in one of your scripts. If you should remove the echo statement and leave the no-op, the while loop will not fail; however, the loop will not do anything either.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/6710975854355257651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/process-file-line-by-line.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/6710975854355257651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/6710975854355257651'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/process-file-line-by-line.html' title='Process a File line by line'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-2950241377960051967</id><published>2011-04-10T05:26:00.001-07:00</published><updated>2011-04-10T05:26:36.526-07:00</updated><title type='text'>Shell Scripts for beginners</title><content type='html'>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Sample 1 :Interactive Shell scripts &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#SS1 &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#Usage : SS1&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;# An Interactive Shell Scripts&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;echo What is Your name\?&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;read name &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;echo Hello $name. Happy Programming.&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color=&quot;#ff0000&quot;&gt;Instructions : &lt;/font&gt;&lt;/strong&gt;Type the same in an Notepad and save the file with the extension (.sh)&lt;/p&gt;  &lt;p&gt;./SS1&lt;/p&gt;  &lt;p&gt;SS1:execute permission Denied (By default every file gets created with the permission 666 i.e., rw-rw-rw-).&lt;/p&gt;  &lt;p&gt;the next thing that we got to do is &lt;/p&gt;  &lt;p&gt;&lt;strong&gt;$umask&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;0022&lt;/strong&gt; ( with this we can read and write the file but we can execute it)&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;$ chmod 744 SS1&lt;/strong&gt;(with this option we get the read,write,execute option open up for our file).&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Sample 2 : Arithmetic in Shell Scripts &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#SS2&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#Usage : SS2&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#Example of Arithmetic Operations &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;a=20 b=10&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;echo ‘expr $a + $b’&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;echo ‘expr $a - $b’&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;echo ‘exp $a * $b’&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;echo ‘expr $a /$b’&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;on execution of this shell scripts we get the following output :&lt;/p&gt;  &lt;p&gt;30&lt;/p&gt;  &lt;p&gt;10&lt;/p&gt;  &lt;p&gt;200&lt;/p&gt;  &lt;p&gt;2&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Sample 3 :&amp;#160; if – then –else – fi&amp;#160; statement&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#SS3 &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;#usage : SS3&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Enter the Source and target file names&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;read source target&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;if cp $ source $ target&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;then &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;echo file copied successfully&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;else &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;echo failed to copy the file&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;fi&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;for further Study on the Unix Shell Scripting one can contact us.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/2950241377960051967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/shell-scripts-for-beginners.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/2950241377960051967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/2950241377960051967'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/shell-scripts-for-beginners.html' title='Shell Scripts for beginners'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-5470471730339851726</id><published>2011-04-10T04:56:00.001-07:00</published><updated>2011-04-10T04:56:14.695-07:00</updated><title type='text'>Sample Unix shell Scripts</title><content type='html'>&lt;p&gt;#ksh: JobNum.sh&lt;/p&gt;  &lt;p&gt;#Author: Prasad Degela&lt;/p&gt;  &lt;p&gt;#Date: 03/13/2006&lt;/p&gt;  &lt;p&gt;#Reviewed by By: &lt;/p&gt;  &lt;p&gt;#Date: &lt;/p&gt;  &lt;p&gt;#Project: Appeals &amp;amp; Grivances Tracking&lt;/p&gt;  &lt;p&gt;####################################################################################&lt;/p&gt;  &lt;p&gt;#This script will call .env file to get common variables.&lt;/p&gt;  &lt;p&gt;# SET PARAMETERS - Part 1&lt;/p&gt;  &lt;p&gt;# These parameters are provided for all interfaces. &lt;/p&gt;  &lt;p&gt;# $1 = environment (DEV)&lt;/p&gt;  &lt;p&gt;####################################################################################&lt;/p&gt;  &lt;p&gt;#set -x&lt;/p&gt;  &lt;p&gt;####################################################################################&lt;/p&gt;  &lt;p&gt;. /etldata/aagt/common/scripts/aagt.env&lt;/p&gt;  &lt;p&gt;inboxdir=$PROJECTDIR/qnxt/inbox&lt;/p&gt;  &lt;p&gt;srcfiledir=$PROJECTDIR/qnxt/estage&lt;/p&gt;  &lt;p&gt;errorfiledir=$PROJECTDIR/qnxt/error&lt;/p&gt;  &lt;p&gt;tempfiledir=$PROJECTDIR/nice/tstage&lt;/p&gt;  &lt;p&gt;tempfiledirqnxt=$PROJECTDIR/qnxt/tstage&lt;/p&gt;  &lt;p&gt;ERROR_EXIT_STATUS=99&lt;/p&gt;  &lt;p&gt;SUCCESS_EXIT_STATUS=0&lt;/p&gt;  &lt;p&gt;echo &amp;quot;Control Moved to the Inbox Directory = &amp;quot;$inboxdir&lt;/p&gt;  &lt;p&gt;cd $inboxdir&lt;/p&gt;  &lt;p&gt;fileconv=`echo &amp;quot;PDP*.txt&amp;quot;`&lt;/p&gt;  &lt;p&gt;echo &amp;quot;fileconv = &amp;quot;$fileconv&lt;/p&gt;  &lt;p&gt;files=`ls -tr $fileconv`&lt;/p&gt;  &lt;p&gt;if [[ $? -ne 0 ]]&lt;/p&gt;  &lt;p&gt;then&lt;/p&gt;  &lt;p&gt;echo &amp;quot;No Source File in the InBox &amp;quot;$inboxdir&lt;/p&gt;  &lt;p&gt;exit $SUCCESS_EXIT_STATUS&lt;/p&gt;  &lt;p&gt;fi&lt;/p&gt;  &lt;p&gt;echo &amp;quot;List Of Files in the Inbox Directory &amp;quot;$inboxdir&lt;/p&gt;  &lt;p&gt;echo &amp;quot;{ $files }&amp;quot;&lt;/p&gt;  &lt;p&gt;for pfilename in $files&lt;/p&gt;  &lt;p&gt;do&lt;/p&gt;  &lt;p&gt;cd $inboxdir&lt;/p&gt;  &lt;p&gt;cp $pfilename $srcfiledir&lt;/p&gt;  &lt;p&gt;gzip $pfilename&lt;/p&gt;  &lt;p&gt;cp $pfilename.gz $ARCHFILEDIR&lt;/p&gt;  &lt;p&gt;rm -f $pfilename.gz&lt;/p&gt;  &lt;p&gt;rm -f TRAIL*.txt&lt;/p&gt;  &lt;p&gt;echo &amp;quot;Source File Name Is &amp;quot;$pfilename&lt;/p&gt;  &lt;p&gt;pDSjobname=&amp;quot;sjAG01&amp;quot;&lt;/p&gt;  &lt;p&gt;pINVOKE_ID=$pfilename&lt;/p&gt;  &lt;p&gt;pJobStatusFile=`echo $pfilename&amp;quot;.stat&amp;quot;`&lt;/p&gt;  &lt;p&gt;pJobLogFile=`echo $pfilename&amp;quot;.log&amp;quot;`&lt;/p&gt;  &lt;p&gt;####################################################################################&lt;/p&gt;  &lt;p&gt;# RESET AND RUN job sequencer #&lt;/p&gt;  &lt;p&gt;####################################################################################&lt;/p&gt;  &lt;p&gt;$DSBINDIR/dsjob -jobinfo $DSPROJECT $pDSjobname.$pINVOKE_ID &amp;gt; $LOGFILEDIR/$pJobStatusFile&lt;/p&gt;  &lt;p&gt;JOBSTATUS=`grep &amp;quot;Job Status&amp;quot; $LOGFILEDIR/$pJobStatusFile | cut -f2 -d &#39;(&#39;|cut -f1 -d &#39;)&#39;`&lt;/p&gt;  &lt;p&gt;echo &amp;quot;$pDSjobname Job status code is &amp;quot;$JOBSTATUS&lt;/p&gt;  &lt;p&gt;if [[ $JOBSTATUS = 3 ]]&lt;/p&gt;  &lt;p&gt;then&lt;/p&gt;  &lt;p&gt;echo &amp;quot;Job Status = &amp;quot;$JOBSTATUS&lt;/p&gt;  &lt;p&gt;$DSBINDIR/dsjob -run -mode RESET -wait -jobstatus $DSPROJECT $pDSjobname.$pINVOKE_ID&lt;/p&gt;  &lt;p&gt;echo &amp;quot;************************* Reset the Job Sequencer *******************&amp;quot;&lt;/p&gt;  &lt;p&gt;fi&lt;/p&gt;  &lt;p&gt;echo AGDB: $AGDB&lt;/p&gt;  &lt;p&gt;echo AGDBUserID: $AGDBUserID&lt;/p&gt;  &lt;p&gt;echo ORADB: $ORADB&lt;/p&gt;  &lt;p&gt;echo ORADBUSRID: $ORADBUSRID&lt;/p&gt;  &lt;p&gt;echo NICEDB: $NICEDB&lt;/p&gt;  &lt;p&gt;echo NICEDBUserID: $NICEDBUserID&lt;/p&gt;  &lt;p&gt;echo SrcFile: $pfilename&lt;/p&gt;  &lt;p&gt;echo SrcFileDir: $SRCFILEDIR&lt;/p&gt;  &lt;p&gt;echo TempFileDirectory: $TEMPFILEDIR&lt;/p&gt;  &lt;p&gt;echo TempFileDirectoryqnxt:$TEMPFILEDIRQNXT&lt;/p&gt;  &lt;p&gt;echo ErrorFileDirectory: $ERRORFILEDIR&lt;/p&gt;  &lt;p&gt;echo ScriptFileDirectory: $SCRIPTFILEDIR&lt;/p&gt;  &lt;p&gt;echo &amp;quot;calling $Jobname Sequence&amp;quot;&lt;/p&gt;  &lt;p&gt;$DSBINDIR/dsjob -run \&lt;/p&gt;  &lt;p&gt;-param AGDB=$AGDB \&lt;/p&gt;  &lt;p&gt;-param AGDBUserID=$AGDBUserID \&lt;/p&gt;  &lt;p&gt;-param AGDBPswd=$AGDBPswd \&lt;/p&gt;  &lt;p&gt;-param ORADB=$ORADB \&lt;/p&gt;  &lt;p&gt;-param ORADBUSRID=$ORADBUSRID \&lt;/p&gt;  &lt;p&gt;-param ORADBPswd=$ORADBPswd \&lt;/p&gt;  &lt;p&gt;-param NICEDB=$NICEDB \&lt;/p&gt;  &lt;p&gt;-param NICEDBUserID=$NICEDBUserID \&lt;/p&gt;  &lt;p&gt;-param NICEDBPswd=$NICEDBPswd \&lt;/p&gt;  &lt;p&gt;-param SrcFile=$pfilename \&lt;/p&gt;  &lt;p&gt;-param SrcFileDir=$SRCFILEDIR \&lt;/p&gt;  &lt;p&gt;-param TempFileDirectory=$TEMPFILEDIR \&lt;/p&gt;  &lt;p&gt;-param TempFileDirectoryqnxt=$TEMPFILEDIRQNXT \&lt;/p&gt;  &lt;p&gt;-param ErrorFileDirectory=$ERRORFILEDIR \&lt;/p&gt;  &lt;p&gt;-param ScriptFileDirectory=$SCRIPTFILEDIR \&lt;/p&gt;  &lt;p&gt;-wait -jobstatus $DSPROJECT $pDSjobname.$pINVOKE_ID&lt;/p&gt;  &lt;p&gt;$DSBINDIR/dsjob -jobinfo $DSPROJECT $pDSjobname.$pINVOKE_ID &amp;gt; $LOGFILEDIR/$pJobStatusFile&lt;/p&gt;  &lt;p&gt;$DSBINDIR/dsjob -logsum $DSPROJECT $pDSjobname.$INVOKE_ID &amp;gt; $LOGFILEDIR/$pJobLogFile&lt;/p&gt;  &lt;p&gt;JOBSTATUS=`grep &amp;quot;Job Status&amp;quot; $LOGFILEDIR/$pJobStatusFile | cut -f2 -d &#39;(&#39;|cut -f1 -d &#39;)&#39;`&lt;/p&gt;  &lt;p&gt;echo &amp;quot;$pDSjobname Job status code is &amp;quot;$JOBSTATUS&lt;/p&gt;  &lt;p&gt;if [[ $JOBSTATUS = 1 ]]&lt;/p&gt;  &lt;p&gt;then&lt;/p&gt;  &lt;p&gt;echo &amp;quot;Job Status = &amp;quot;$JOBSTATUS&lt;/p&gt;  &lt;p&gt;echo &amp;quot;Removing File from $srcfiledir on successful processing of file $pfilename&amp;quot;&lt;/p&gt;  &lt;p&gt;cd $srcfiledir&lt;/p&gt;  &lt;p&gt;rm -f $pfilename&lt;/p&gt;  &lt;p&gt;else &lt;/p&gt;  &lt;p&gt;exit $ERROR_EXIT_STATUS&lt;/p&gt;  &lt;p&gt;fi&lt;/p&gt;  &lt;p&gt;done&lt;/p&gt;  &lt;p&gt;echo 99 END OF THE PROG&lt;/p&gt;  &lt;p&gt;exit $SUCCESS_EXIT_STATUS&lt;/p&gt;  &lt;p&gt;#&lt;/p&gt;  &lt;p&gt;#####################################################################################################&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/5470471730339851726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/sample-unix-shell-scripts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/5470471730339851726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/5470471730339851726'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/sample-unix-shell-scripts.html' title='Sample Unix shell Scripts'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-5584369367422557859</id><published>2011-04-10T04:50:00.001-07:00</published><updated>2011-04-10T04:50:59.698-07:00</updated><title type='text'>Standards for ETL UNIX Shell Scripts for use with PowerCenter 7.1.3</title><content type='html'>&lt;p&gt;&lt;b&gt;Standards for ETL UNIX Shell Scripts for use with PowerCenter 7.1.3&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Scripting Standards (for PowerCenter version 7.1.3):&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Scripting standards include the use of a UNIX shell script, which the scheduling tool uses to start the PowerCenter job, and a separate file which contains the username and password for the user called in the script. The following is a template that should be used to create scripts for new scheduled jobs. Following is the script and explanation. This script has been provided as an example and is named &lt;b&gt;&lt;i&gt;etl_unix_shell_script.sh&lt;/i&gt;&lt;/b&gt;.&lt;/p&gt;  &lt;p&gt;# Program: etl_unix_shell_script.sh&lt;/p&gt;  &lt;p&gt;# Author: Kevin Gillenwater&lt;/p&gt;  &lt;p&gt;# Date: 7/24/2003&lt;/p&gt;  &lt;p&gt;# Purpose: Sample UNIX shell script to load environment variables&lt;/p&gt;  &lt;p&gt;# needed to run PowerMart jobs, pass username and password variables&lt;/p&gt;  &lt;p&gt;# and start the job using the pmcmd command line.&lt;/p&gt;  &lt;p&gt;#&lt;/p&gt;  &lt;p&gt;# $1 = Project Id Parameter (ie. ud, hr, dss, siq, etc.)&lt;/p&gt;  &lt;p&gt;#&lt;/p&gt;  &lt;p&gt;# Example usage: etl_unix_shell_script.sh dss&lt;/p&gt;  &lt;p&gt;#&lt;/p&gt;  &lt;p&gt;# NOTE: Enter the Project ID parameter that is designated in the&lt;/p&gt;  &lt;p&gt;# directory structure for your team&lt;/p&gt;  &lt;p&gt;# (ie. dss would be used for the DWDAS team as the&lt;/p&gt;  &lt;p&gt;# directory is /usr/local/autopca/dss/)&lt;/p&gt;  &lt;p&gt;#-----------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;# Call the script to set up the Informatica Environment Variables:&lt;/p&gt;  &lt;p&gt;#-----------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;. /usr/local/bin/set_pm_var.sh&lt;/p&gt;  &lt;p&gt;#-----------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;# Read ETL configuration parameters from a separate file:&lt;/p&gt;  &lt;p&gt;#-----------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;ETL_CONFIG_FILE=$JOBBASE/$1/remote_accts/test_etl.config&lt;/p&gt;  &lt;p&gt;ETL_USER=`grep ETL_USER $ETL_CONFIG_FILE | awk -F: &#39;{print $2}&#39;`&lt;/p&gt;  &lt;p&gt;ETL_PWD=`grep ETL_PWD $ETL_CONFIG_FILE | awk -F: &#39;{print $2}&#39;`&lt;/p&gt;  &lt;p&gt;#-----------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;# Start the job&lt;/p&gt;  &lt;p&gt;#-----------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;$PM_HOME/pmcmd startworkflow -u $ETL_USER -p $ETL_PWD -s $MACHINE:4001 -f DWDAS_&lt;/p&gt;  &lt;p&gt;LOAD_dssqa –wait s_m_CENTER_INSTITUTE&lt;/p&gt;  &lt;p&gt;#-----------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;# Trap the return code&lt;/p&gt;  &lt;p&gt;#-----------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;rc=$?    &lt;br /&gt;if [[ $rc -ne 0 ]] then     &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; exit $rc     &lt;br /&gt;fi&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;u&gt;Notes Regarding the Script/Standards:&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;1. The beginning of each script should call and execute the script &lt;b&gt;&lt;i&gt;set_pm_var.sh&lt;/i&gt;&lt;/b&gt; to set up the PowerCenter variables used in the session (. /usr/local/bin/set_pm_var.sh). The &lt;b&gt;&lt;i&gt;set_pm_var.sh,&lt;/i&gt;&lt;/b&gt; located on each machine (Leisure for Production and Glance for Development), will provide ease of maintenance if changes need to be made to PowerCenter variables, and will provide one source for the scripts on a machine. The following is the code in the script. &lt;u&gt;You will not need to do anything with this script, it is for informational purposes only&lt;/u&gt;:     &lt;br /&gt;# Program: set_pm_var.sh&lt;/p&gt;  &lt;p&gt;# Author: Kevin Gillenwater&lt;/p&gt;  &lt;p&gt;# Date: 7/3/2003&lt;/p&gt;  &lt;p&gt;# Purpose: UNIX script which sets the variables for running PowerMart 6.2&lt;/p&gt;  &lt;p&gt;# when called from a shell script (ie. script run by Autosys).&lt;/p&gt;  &lt;p&gt;#-------------------------------------------&lt;/p&gt;  &lt;p&gt;#Set up the Informatica Variables&lt;/p&gt;  &lt;p&gt;#-------------------------------------------&lt;/p&gt;  &lt;p&gt;export MACHINE=`hostname`&lt;/p&gt;  &lt;p&gt;export SHLIB_PATH=/usr/local/pmserver/informatica/pm/infoserver&lt;/p&gt;  &lt;p&gt;export PM_HOME=/usr/local/pmserver/informatica/pm/infoserver&lt;/p&gt;  &lt;p&gt;#---------------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;# Set the environment variables needed for scheduling jobs.&lt;/p&gt;  &lt;p&gt;# The value of JOBBASE differs based on the account. For AUTOSYS&lt;/p&gt;  &lt;p&gt;# and AUTODBA, the variable should evaluate to /usr/local/autopca.&lt;/p&gt;  &lt;p&gt;# For all other accounts, it should evaluate to their $HOME variable.&lt;/p&gt;  &lt;p&gt;#---------------------------------------------------------------------&lt;/p&gt;  &lt;p&gt;case $HOME in&lt;/p&gt;  &lt;p&gt;/home/autopca/autopca) JOBBASE=/usr/local/autopca ;;&lt;/p&gt;  &lt;p&gt;/home/autopca/autodba) JOBBASE=/usr/local/autopca ;; &lt;/p&gt;  &lt;p&gt;*) JOBBASE=$HOME ;;&lt;/p&gt;  &lt;p&gt;esac&lt;/p&gt;  &lt;p&gt;export JOBBASE&lt;/p&gt;  &lt;p&gt;2. The second section of &lt;b&gt;&lt;i&gt;etl_unix_shell_script.sh&lt;/i&gt;&lt;/b&gt; sets up ETL parameters for username and password usage by PowerCenter when running the workflow. The username and password are no longer stored as part of the main shell script. In the script example, the filename &lt;b&gt;&lt;i&gt;test_etl_config&lt;/i&gt;&lt;/b&gt; contains the username and password to be used when running the workflow. Following is the contents of &lt;b&gt;&lt;i&gt;test_etl_config&lt;/i&gt;&lt;/b&gt;:&lt;/p&gt;  &lt;p&gt;ETL_USER:etlguy&lt;/p&gt;  &lt;p&gt;ETL_PWD:ou812 &lt;/p&gt;  &lt;p&gt;This file (your password file) &lt;u&gt;must&lt;/u&gt; be located in your team directory under the &lt;b&gt;&lt;i&gt;remote_accts&lt;/i&gt;&lt;/b&gt; folder (i.e. /usr/local/autopca/dss/remote_accts/). The folder permissions on the Production machine will only permit PCA’s access to this folder. The permissions should be 6-4-0 (rw,r,-) on this file.&lt;/p&gt;  &lt;p&gt;3. The third section of &lt;b&gt;&lt;i&gt;etl_unix_shell_script.sh&lt;/i&gt;&lt;/b&gt; contains the command to run the workflow in PowerCenter. Please follow the script exactly. The only thing that will need to be changed in this section is the folder name and the workflow within the folder that is being executed &lt;/p&gt;  &lt;p&gt;(i.e. ... DWDAS_LOAD_dssqa wflw_m_CENTER_INSTITUTE).&lt;/p&gt;  &lt;p&gt;4. The final section of &lt;b&gt;&lt;i&gt;etl_unix_shell_script.sh&lt;/i&gt;&lt;/b&gt; contains code to trap the return code of the script that indicated success or failure..     &lt;br /&gt;*8/27/03 – Added ‘-wait’ parameter to the pmcmd command line to start the scheduled job.     &lt;br /&gt;*10/6/04 - Updated to generalize the scheduling tool used to run the shell scripts as UC4 has been chosen to replace Autosys as the scheduling tool used to run PowerMart workflows.&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/5584369367422557859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/standards-for-etl-unix-shell-scripts.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/5584369367422557859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/5584369367422557859'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/04/standards-for-etl-unix-shell-scripts.html' title='Standards for ETL UNIX Shell Scripts for use with PowerCenter 7.1.3'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-7577791580144135932</id><published>2011-03-25T07:15:00.000-07:00</published><updated>2011-04-22T20:02:29.077-07:00</updated><title type='text'>Pattern Matching</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left&quot; trbidi=&quot;on&quot;&gt;   &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center&quot;&gt;&lt;/div&gt;    &lt;br /&gt;    &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center&quot;&gt;&lt;/div&gt;    &lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center&quot;&gt;&amp;#160;&lt;/div&gt;    &lt;br /&gt;    &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;453&quot; border=&quot;2&quot;&gt;&lt;tbody&gt;       &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Options&lt;/strong&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;*&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches any number of character including NONE. * does not match all files beginning with dot &amp;lt;.&amp;gt;.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls -l chap*&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches all the files which starts with chap.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls -x chap*&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches all the files which starts with chap and prints in multi column way.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;           &lt;br /&gt;            &lt;br /&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;?&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches single character.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls -l chap?&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches all the files with only 5 character name and should start with chap.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;           &lt;br /&gt;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;[ ijk ]&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches single character either i or j or k.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;[ !ijk ]&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches single character that is not i or j or k&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;[ x - z ]&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches single character that is not within the ASCII range of character x and z.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;[ ! x - z ] &lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches single character that is not within the ASCII range of character x and z&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls -l chap0[1 - 4]&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Range specification is also available.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls -l [ a – z A-Z]&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches all file names beginning with alphabet irrespective of case.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls -l chap[!0 - 9]&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Matches all file names beginning with alphabet chap and not ending with any number.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls *.ist&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Print all the files which end with ist extensions.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;cp chap?? abc&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Copy all files starts with chap to abc directory.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;cmp chap[12]&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Compares file chap1 and chap2.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;mv *&amp;#160; ../bin&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Moves all the files to bin directory.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;cat chap[!0 - 9] &lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Concatenates all the files beginning with chap and not ending with number.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls -l *&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;           &lt;p&gt;* does not match all files beginning with dot &amp;lt;.&amp;gt;.&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls -l .???*&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;The above problem can be solved with specifying first few character using meta character &amp;lt;?&amp;gt; explicitly.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Escaping Backslash ( \ )&lt;/strong&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Playing with file names which uses meta character in their file name.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls - l chap*&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Print all files whose names start with chap but not the one whose name is chap*.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;ls - l chap\*&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;The above problem can be solved by escaping the special character.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Pipe |&lt;/strong&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;To pass the standard output of one command as the standard input to another.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;who | wc -l&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Output of who command &amp;lt;three users&amp;gt; passed as input to wc which count the number of lines present.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;           &lt;br /&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Tee&lt;/strong&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;who | tee users list&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Tee saves the output of who command in user list as well as display it also.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;           &lt;br /&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;&amp;#160;&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&lt;strong&gt;Shell Variable&lt;/strong&gt;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Shell variables are initialized to null value &amp;lt; by default &amp;gt; so it returns null. All words starts with $ are considered as variable unless single quoted or escaped.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;a=ab, b=cd, z=$a$b. echo $z&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;shell concatenate two variable.&lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;echo &#39;$10&#39;           &lt;br /&gt;            &lt;br /&gt;eg: $10&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;           &lt;p&gt;All words starts with $ are considered as variable unless single quoted or escaped.&lt;/p&gt;         &lt;/td&gt;       &lt;/tr&gt;        &lt;tr&gt;         &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;&amp;#160;&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;133&quot;&gt;echo &amp;quot;$10&amp;quot;           &lt;br /&gt;            &lt;br /&gt;eg: 0&lt;/td&gt;          &lt;td valign=&quot;top&quot; width=&quot;183&quot;&gt;Shell is looking for $1 variable which is undefined so passes null for this. $1 is part of positional parameter.&lt;/td&gt;       &lt;/tr&gt;     &lt;/tbody&gt;&lt;/table&gt;    &lt;br /&gt;&lt;/div&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/7577791580144135932/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/pattern-matching_25.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/7577791580144135932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/7577791580144135932'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/pattern-matching_25.html' title='Pattern Matching'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-826037780661868112</id><published>2011-03-25T07:08:00.000-07:00</published><updated>2011-03-25T07:08:09.219-07:00</updated><title type='text'>Control Structures</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHMaXVseWMy8qYtHnuIu2LOhEs1Ohfrwqfn2AgLDOaJifOkFFxRL1Q3Jypc_mNdgHCIH7QZtLId7TlrmRRDQ90wh6k_9pK6OaGLzgnPr2FdzhoGh1J3_vHqHEWgn2_TgqaxbybkQTqtHZc/s1600/untitled.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;466&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHMaXVseWMy8qYtHnuIu2LOhEs1Ohfrwqfn2AgLDOaJifOkFFxRL1Q3Jypc_mNdgHCIH7QZtLId7TlrmRRDQ90wh6k_9pK6OaGLzgnPr2FdzhoGh1J3_vHqHEWgn2_TgqaxbybkQTqtHZc/s640/untitled.bmp&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1FkxeZzes52NI3HaknfO8TqER2Qtxfte4-LvphSwwfJvbwjQ9ACewDF4CaUBrdq-muhaEiniIoe52aoU9KTLHiR7IHPCa2vtatGTIMFw3635CMYpj_2226qyD0rHWJctMm16YlJjKCWSK/s1600/untitled2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;348&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1FkxeZzes52NI3HaknfO8TqER2Qtxfte4-LvphSwwfJvbwjQ9ACewDF4CaUBrdq-muhaEiniIoe52aoU9KTLHiR7IHPCa2vtatGTIMFw3635CMYpj_2226qyD0rHWJctMm16YlJjKCWSK/s640/untitled2.bmp&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/826037780661868112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/control-structures.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/826037780661868112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/826037780661868112'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/control-structures.html' title='Control Structures'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHMaXVseWMy8qYtHnuIu2LOhEs1Ohfrwqfn2AgLDOaJifOkFFxRL1Q3Jypc_mNdgHCIH7QZtLId7TlrmRRDQ90wh6k_9pK6OaGLzgnPr2FdzhoGh1J3_vHqHEWgn2_TgqaxbybkQTqtHZc/s72-c/untitled.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-7160862771146680754</id><published>2011-03-24T10:58:00.001-07:00</published><updated>2011-04-22T19:42:02.438-07:00</updated><title type='text'>Pattern Searching</title><content type='html'>&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;440&quot; border=&quot;2&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;strong&gt;Commands&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&lt;strong&gt;Options&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;/&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;/Unix&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Forward search of Unix keyword in file&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;?&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;?Unix&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Backward search of Unix keyword in file&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;n&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Repeat the last search&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;.&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Repeat the previous command&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;         &lt;br /&gt;          &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;:1, $s/&amp;lt;search string&amp;gt;/&amp;lt;Replace String &amp;gt;/g&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Pattern search and replacement.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;1,$&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Represent all lines in the file.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;g&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Stands for globally&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;:3,10s/gagan/deep/g&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;search between lines 3 and 10&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;: .s/gagan/deep/g&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Only the current line.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;: $s/gagan/deep/g&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Only the last line.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;: $s/gagan/deep/gc&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;c&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Ask for confirmation for replacement&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;         &lt;br /&gt;          &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;strong&gt;grep&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;-c&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;counting occurrence.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;-n&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;display line number for record.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;-v&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;skip records that contain directory.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;-l&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;display files containing record.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;-i&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;ignore case.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;[PQR]&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;match any single character.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;[c1-c2]&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;match char with ASCII range&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;[^PQR]&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;match single character which is not PQR.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;^&amp;lt;pat&amp;gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;beginning with pattern.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;lt;pat&amp;gt;$&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;ending with pattern.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;{a-Z A-Z 0-9}&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;match any single character.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;ls –l |grep “^d”&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Prints only directories.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;         &lt;br /&gt;          &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;strong&gt;egrep&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;egrep &#39;[aA]g+[ar][ar]wal&#39; test1.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;match one or more occurrence matches ag &amp;amp; agg. &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;egrep &#39;[aA]gg?[ar][ar]wal&#39; test1.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;match zero or one occurrence. &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;egrep prashant|director test1.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;match eap1 or eap2&amp;#160; (finds prashant or line with director)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;egrep (das|sen)gupta test1.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;match exp x1x3 or x2x3 (like dasgupta &amp;amp; sengupta)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;egrep -f &amp;lt;pattern_file_name&amp;gt; test1.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Huge list of pattern search can passed in the form of file name .pattern stored in file eg(prashant|admin|director)&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;+&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Matches one or more occurrence of previous character.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;?&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Matches zero or one occurrence of previous character.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;         &lt;br /&gt;          &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&lt;strong&gt;Fgrep&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;fgrep and egrep accepts multiple pattern both form command line and a file but unlike grep and egrep&amp;#160; does not accept regular expression.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;86&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;180&quot;&gt;fgrep -f pattern file emp file&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;170&quot;&gt;Faster than grep and egrep family&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/7160862771146680754/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/pattern-searching.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/7160862771146680754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/7160862771146680754'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/pattern-searching.html' title='Pattern Searching'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-3434028677315188113</id><published>2011-03-24T09:06:00.001-07:00</published><updated>2011-04-22T21:36:04.377-07:00</updated><title type='text'>Zipping Files</title><content type='html'>&lt;table cellspacing=&quot;0&quot; cellpadding=&quot;2&quot; width=&quot;472&quot; border=&quot;2&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;84&quot;&gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;235&quot;&gt;&lt;strong&gt;Options&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;84&quot;&gt;1. &lt;strong&gt;gzip&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;236&quot;&gt;gzip etl_code          &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt;etl_code.gz&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;gunzip etl_code.gz          &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; etl_code&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;zip file*sql          &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; file.zip&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;unzip file.zip          &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt;file*sql&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;         &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;2. tar&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;create backup of files recursively.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-cvf          &lt;br /&gt;&lt;strong&gt;eg :&lt;/strong&gt;tar -cvf /home/gagan/sqlbackup ./*.sql&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;- x          &lt;br /&gt;eg:tar-xcvf /home/gagan/sqlbackup ./*.sql&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;files are restored using -x option.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;         &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;         &lt;br /&gt;&lt;strong&gt;3. Cut&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-c &amp;lt;column start and no&amp;gt;          &lt;br /&gt;          &lt;br /&gt;&lt;strong&gt;eg :&lt;/strong&gt; cut -c -5,6-12 test file&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;column (by specifying position). C stands for column cut.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-f &amp;lt;field start and end no&amp;gt;          &lt;br /&gt;          &lt;br /&gt;eg:cut -f 1,5 test file&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;field (default deliminator tab). F stands for field cut.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&#39;-d -f &amp;lt;field start and end no&amp;gt;          &lt;br /&gt;          &lt;br /&gt;eg: cut -d &amp;quot;|&amp;quot; -f 1,5 test file | new file&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;Cut the field b/w 1 and 5 and piped the output to new file.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;4. sort&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;sort test file&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;By default the sorting starts with first character of each line. Priority1.space, tabs 2. numerals 3.uppercase letters 4. Lower case letters.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-t          &lt;br /&gt;eg : sort -t &amp;quot;|&amp;quot; +2 test file&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;Sorting starts from 3rd field skipping 2nd field, overring the default.delimiter to distinguish b/w start and end of field.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-r         &lt;br /&gt;eg : sort -t \| -r +2 test file&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;Reverse sort starting with 3rd field.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;eg : sort -t \|&amp;#160; +2r test file&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;The above command can be written in another way.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-o         &lt;br /&gt;eg : sort -o abc.txt abc_sort.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;save sorted data in file.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;eg : sort -t &amp;quot;|&amp;quot; +1 -2 +3 &amp;lt;&amp;gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;Sorting based on different field as in case of order by clause.Sorting starts with 2nd field then with 4th field, -2 indicate to stop the sorting after 2nd field and resume it with 3rd field.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-n         &lt;br /&gt;&lt;strong&gt;eg :&lt;/strong&gt; sort -n &amp;lt;&amp;gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;Numeric sort.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-u         &lt;br /&gt;&lt;strong&gt;eg :&lt;/strong&gt; sort -u &amp;lt;&amp;gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;Unique sort.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;5.paste&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-d         &lt;br /&gt;          &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt;paste -d &amp;quot;|&amp;quot; &amp;lt;&amp;gt; &amp;lt;&amp;gt;          &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;deliminator.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;         &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;6.tr&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&lt;strong&gt;eg :&lt;/strong&gt; tr &#39;|\&#39; &#39;~-&#39; &amp;lt;test.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;translate all | with ~ and \ with - .&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&lt;strong&gt;eg :&lt;/strong&gt; tr &#39;[a-z]&#39; &#39;[A-Z] &amp;lt;test.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;translate to upper case.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-d         &lt;br /&gt;&lt;strong&gt;eg :&lt;/strong&gt; tr -d &#39;|&#39; test.txt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;delete all occurrence of | .&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;         &lt;br /&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;7.uniq&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;Unique require sorted file as input.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-u         &lt;br /&gt;          &lt;br /&gt;&lt;strong&gt;eg :&lt;/strong&gt; cut -d &amp;quot;|&amp;quot; -f3 &amp;lt;&amp;gt;|sort|uniq -u&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;remove duplicate.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-d         &lt;br /&gt;          &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; cut -d &amp;quot;|&amp;quot; -f3 &amp;lt;&amp;gt;|sort|uniq -d&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;select only dup records.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;-c         &lt;br /&gt;          &lt;br /&gt;&lt;strong&gt;eg :&lt;/strong&gt; cut -d &amp;quot;|&amp;quot; -f3|sort|uniq -c&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;duplicate&amp;#160; count.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;8.Changing time stamp&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;touch mon date hrs mins &amp;lt;file&amp;gt;.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;ls -lt&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;time of last modification&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;touch -m 01290430 &amp;lt;file&amp;gt;.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;ls -lu&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;time of last access&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;touch -a 01290415 &amp;lt;file&amp;gt;.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;         &lt;br /&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;9.Change Date &lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;date 09181754&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;10.wall&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;wall -g dba &amp;quot;hello&amp;quot;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;to selectively send msg to dba group.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;11.shutdown&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;shutdown -g2&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;power down after 2 mins.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;shutdown -y -g0&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;immediate shutdown.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;shutdown -y -g0 -i6&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;shutdown and reboot (init level 6).&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;shutdown 17:30&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;shutdown at 17:30.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;shutdown -r now&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;shutdown immediate and reboot.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;12. du&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;Disk usage.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;du /home/expimp/create_db&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;tree output for each directory inside.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;237&quot;&gt;du -s //home/expimp/create_db&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;summary.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;&amp;#160;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&lt;strong&gt;13.find &lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;find &amp;lt;loc&amp;gt; &amp;lt;option&amp;gt; &amp;lt;pattern&amp;gt; &amp;lt;action&amp;gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;find in root dir abc in emp.lst file&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;&#39;-mtime = mod time          &lt;br /&gt;&lt;strong&gt;eg: &lt;/strong&gt;find . -mtime -2 -print&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;find file modi in less then 2 days.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;&#39;atime = access time         &lt;br /&gt;&lt;strong&gt;eg: &lt;/strong&gt;find . -atime +365 -print&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;find the file not accessed in last 1 year.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;! –newer         &lt;br /&gt;eg: find / -name &amp;quot;*.pl&amp;quot; ! -newer last_backup -print&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;file modi before last_backup.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;-size.         &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; find . -size +2048 -print&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;files greater then x blocks.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;-a (and) -o (OR)         &lt;br /&gt;&lt;strong&gt;eg: find . \( -name &amp;quot;*.sh&amp;quot; -o -name &amp;quot;*.lst&amp;quot; \) -print&lt;/strong&gt;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;double quotes necessary.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;-exec         &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; find . -atime +180 -ok rm -f {} \;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;remove the files which are not modi for last 20 days&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;-ok         &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; find . -atime +180 -ok rm -f {} \;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;before removing prompt for confirmation.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;xargs         &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; find . -mtime +20 | xargs rm -f&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;remove all file rm will be executed only once.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;xargs -n -p –t         &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt;find . -mtime +20 | xargs -n20 -p -t rm -f&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;remove at max 20 files in batch and in interactive mode.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;-type          &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; find / -name log -type f -print&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;f for file and d for directory.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign=&quot;top&quot; width=&quot;83&quot;&gt;&amp;#160;&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;238&quot;&gt;-prune         &lt;br /&gt;&lt;strong&gt;eg:&lt;/strong&gt; find . -name *.log -prune exe –print.&lt;/td&gt;        &lt;td valign=&quot;top&quot; width=&quot;149&quot;&gt;don&#39;t descend exe directory.&lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/3434028677315188113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/zipping-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/3434028677315188113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/3434028677315188113'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/zipping-files.html' title='Zipping Files'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-8724524611693116247</id><published>2011-03-24T08:49:00.001-07:00</published><updated>2011-03-24T08:50:26.868-07:00</updated><title type='text'>Basic Commands Part2</title><content type='html'>&lt;table bordercolor=&quot;#000000&quot; bordercolordark=&quot;#000000&quot; width=&quot;455&quot; bgcolor=&quot;#ffffff&quot; bordercolorlight=&quot;#000000&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;&lt;strong&gt;Options&lt;/strong&gt;&lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;25.Head&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;head newfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;head -5 newfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;head -1 newfile | wc -c&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;vi &#39;ls -t | head -1&#39;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;head -c 512 newfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;head -c 1b newfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;head -c 2m newfile&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Display top content of file&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Display top 10 lines of file when used without argument&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Display top 5 lines of file&amp;lt;newfile&amp;gt; when used without argument&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To count the number of character present in first line.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To open the last modified file for editing.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To pick special no of character from file.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print first 512 byte character&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print first 2 blocks (1 MB each)&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;26.Tail&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;tail -5&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;tail +10&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;tail -f 6_load.log&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Display end of file&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Display last 5 lines of file.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;start dispplaying 10 line onward till the end.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print the gworth of file&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;27.$$&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;&lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints the Process id of current shell&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;28.ps&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ps -f&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ps -f -u a_cmdb&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ps -a&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ps -e&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints the Processes associated with current user.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints the Processes associated with current user with their hierarchy.f stands for full.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints all the processes associated with a_cmdb user.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints all the users processes.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints system process.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;prints all the ksh process running in the system by first searching for all the process.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;29.Background job&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ps -f&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ps -f -u a_cmdb&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ps -a&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ps -e&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Running job in background&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Run the search job in background by printing its process id.Shell become the parent of all background process.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;This command print all the jobs runnung in background with their sequence no of exceution.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Running fg will bring most recently started background process &amp;lt;LAST IN FIRST OUT&amp;gt;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;First job will come into foreground.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;30.nohup&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;245&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;nohup ps -eaf | grep &#39;ksh&#39; &amp;amp;&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Shell is parent of all background jobs and it dies when user logs out and ultimately all the child process also dies.To avoid dying of shell even when the user logs out run the background process using nohup command.                 &lt;br /&gt;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;System process init having PID as 1 is parent of all SHELL processes and when the user login this PID become the PPID of SHELL prrocess. Now after running the process in nohup mode kernel has reassigned the PPID of ps process with PID of system process which will not die even after SHELL dies through logging out.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;31.Kill&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;kill 520&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;kill 640&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;kill 1&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;kill $!&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;kill 0&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To kill the command.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Kill the process with 520 process id.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Kill the parent process id which inturn kill all the child process.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Killing system process init is not possible. A Process having process id as 1 is parent of all SHELL processes.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;No need to remember Process id of last background procees its in $!&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Kill all process in the system except login shell process.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;$$ stores the PID of current login shell&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;32.Nice&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;245&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;nice who | wc - l &amp;amp;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;nice -n 10 who | wc -l &amp;amp;&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Running the command with low priority&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Nice value range from 1 to 39, higher the nice value lower the priority.default nice value is 20.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;nice value becomes 30.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;33.At&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;245&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;at 2:10 load.ksh&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To Run the job at specied time of the day.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Indicate the load.ksh will execute today by 2:10&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;34.Batch&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;245&quot;&gt;batch load.ksh&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;batch command executes the process whenever the CPU is free.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;35.Cron&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;&lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;cron executes process at regular intervals it keeps checking the control file at /user/spool/cron/crontabs for jobs.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;36.Finger&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;245&quot;&gt;finger&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;finger a_cmdb&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Produces list of all logged users when run without any argument. The 2nd and last field of output is taken fron passwd file from /etc directory.                 &lt;br /&gt;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints details about a_cmdb user.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;37.Set&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;245&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;set 10 20 30&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;-x&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;set the posional parameter.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;This will set $1, $2, $3 , $* and $# posional parameter&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;When this statement is used at start of ksh script it echoes each statement at the terminal&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;38.Shift&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;shift&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;shift 2&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;shift command transfer the contents of positional parameter to next lower number.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;shift one position.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;shift 2 places&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;39.Chown&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chown jaspreet testfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chown -R jaspreet testfile&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To change the owner of file can only be done by owner or sys admin.                 &lt;br /&gt;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;change the owner from gagan to jaspreet for testfile. Now gagan cannot change the ownership of test file what he can do is just create the similar copy of file and then he can become the owner of file.                 &lt;br /&gt;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Recursively changes the owner all files under current directory.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;40.Chgrp&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chgrp GTI test file&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chgrp -R GTI test file&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To change the group of file can only be done by owner or sys admin.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;group changed to GTI from IB as user is still the same and he can again change the group of file to IB.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Recursively changes group all files under current directory.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;41.Touch&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;touch 03161430 test file&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;touch -m 04161430 test file&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;touch -a 05161430 test file&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Changing the time stamps of file&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;touch without any argument will change both modified time and access time.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Changes only modification time.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Changes only access time.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;42.Linking in&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ln 6_load.ksh 7_load.ksh&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;rm 6_load.ksh&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Linking two file, doing this both the file will have same inode number and changes in one will reflect in another also.                 &lt;br /&gt;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;ls -li 6_load.ksh 7_load.ksh will give us same inode number.                 &lt;br /&gt;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Drop the link between two files.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;43.df&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;df -t /home/oracle&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints the amount of free space available on the disc.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints the free and total space under oracle file system.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;95&quot;&gt;44.du&lt;/td&gt;        &lt;td width=&quot;110&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;du -s&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;du -s /home/*&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;248&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints the disk usage of specific directory tree.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;By default du prints disk usage for each sub directory.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints summary of whole directory tree.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints disk usage for every user&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/8724524611693116247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/basic-commands-part2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/8724524611693116247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/8724524611693116247'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/basic-commands-part2.html' title='Basic Commands Part2'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-8173741244657400050</id><published>2011-03-24T08:32:00.001-07:00</published><updated>2011-03-24T08:32:01.503-07:00</updated><title type='text'>Basic Commands Part1</title><content type='html'>&lt;table bordercolor=&quot;#000000&quot; bordercolordark=&quot;#000000&quot; width=&quot;465&quot; bgcolor=&quot;#ffffff&quot; bordercolorlight=&quot;#000000&quot; border=&quot;1&quot;&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;&lt;strong&gt;Option&lt;/strong&gt;&lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;1. Uname&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;uname -r&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;uname -n&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To find the version of unix os&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To find the machine name&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;2. Man&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;man grep&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;man -e grep&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;man -k copy&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print the user manual for any command.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To find the user manual for grep command.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;One line definition of grep usage.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Helpful when we donot know which command will solve the purpose.e.g :- gives the different option available for copying.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;3.Cal&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;cal 2009&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;cal dec&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print the calendar year or month&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print the calendar 2009 year&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print calender for current december month&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;4. Date&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;date&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;date +%m&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;date +%h&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;date +&#39;%h%m&#39;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;date +%d&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;date +%y&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;H,M and S&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;193&quot;&gt;Tue Mar 09 07:10:10 IST 2009&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;3&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;March&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;Mar-03&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;10&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;9&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;5.Who &lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;who&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;who am I&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;who -H&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;who -u&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Login details of all the users in system&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Login details for only myself&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Login details for all users with headers info&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Login details for only active users&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;6.Passwd&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;&lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To change the password&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;7.Lock&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;lock -45&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;lock the terminal for 45 minutes&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;8.Bc&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;&lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To use the calculator&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;9.ls&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -x&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -F&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -a&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -r&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -x abc&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -R&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -ld&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -il testfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -lt&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -ltr&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;ls -lut&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To Print the contents of current directory.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints Multi column output of files with their names.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To Print only directoris and executable files.&amp;lt; * &amp;gt; indicate all files containing executable code and &amp;lt;/&amp;gt; indicate the directories.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print all files including hidden files. &amp;lt;a&amp;gt; stands for all.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Reverse the sort order of all the files with their names.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print the content of abc directory.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print all files and sub-directories in directory TREE.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print all the directories.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints the inode number of file.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints all the file with their last modification time keeping latest modified at top.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Prints all the file with their last modification time in reverse order keeping last modified at bottom.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;prints last access time of files.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;10.Cat&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;cat testfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;cat &amp;gt; testfile&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print the content of any file.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Create a new file with testfile name.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;11.CP&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;cp -i testfile abc&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;cp -r abc newabc&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To copy file and directories.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;copying testfile to abc directory interactively.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;copying entire directiry structure abc to newabc recursively.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;12.rm&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;rm -f newabc&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;rm -r newabc&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;All the options of cp command is applicable for rm command.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Removing directory newabc forcefuly.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Recursive deletion will not remove the write protected files.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;13.lp&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;&lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Used for Printing the files&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;14.Split&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;split testfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;split -72 testfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;split testfile newfile&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To split the big files in different small files of 1000 lines each&amp;lt;default&amp;gt;.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Split the files into small files.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;change the default split line size to 72.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Renaming the testfile to new name as &amp;lt;newfile&amp;gt;.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;15. Cmp         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; comm          &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; Diff &lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;&lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;These three command are used to find the difference in two files&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;16.wc&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;wc -w testfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;wc -c testfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;wc -l testfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;wc testfile&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print the numbers of words, lines and character in the file&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;17.Path&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;PATH=$PATH:/home/         &lt;br /&gt;gagan:/home/deep&lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;Set the path variable for SHELL to use these directory path to locate the executables commands.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;18.stty&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;stty -a&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;stty intr \^c&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;stty eof \^a&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print current setting of terminal&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To delete the character during backspacing&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To change the interrupt key to Ctrl c instead of &#39;DELETE&#39; default&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To change the termination control of input during file creation using cat command from Ctrl d to Ctrl a.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;19.Alias&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;alias&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;alias l =&#39;ls -ltr&#39;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;alias showdir =&#39;cd $1;ls -l&#39;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;unalias&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print all the alias set in the system.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To create short hand names of command.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Passing positional parameter ETL to showdir alias will take us to that directory.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To redefine and unset the alias.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;20.History&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;history -5&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;history 10 15&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;HISTSIZE 1200&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To find the previous command that has been used.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Print the last 5 command that has been used.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Every command has event number. Display event number between 10 an d15.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To change the defalult setting of command history saving feature.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;21. r         &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; !!&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;                 &lt;br /&gt;                  &lt;br /&gt;r-2&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;r 20&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Repeat previous command in Korn&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Repeat previous command in Bash                 &lt;br /&gt;                  &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;                     &lt;tr&gt;                       &lt;td width=&quot;1233&quot;&gt;Repeat previuos to prevoius command&lt;/td&gt;                     &lt;/tr&gt;                      &lt;tr&gt;                       &lt;td width=&quot;1233&quot;&gt;Repeat the command with 20 event number.&lt;/td&gt;                     &lt;/tr&gt;                   &lt;/tbody&gt;&lt;/table&gt;               &lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;22.Tilde(~)&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;&lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Changes control to home directory&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Changes absolute path home directory of user a_cmdb, the value of home directory can be seen by $HOME environment variable&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;23.cd - &lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;&lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;To switch between current working directory and most recently used directory.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td width=&quot;107&quot;&gt;24.chmod&lt;/td&gt;        &lt;td width=&quot;114&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;283&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chmod u+rwx newfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chmod g+x newfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chmod 757 newfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chmod 457 newfile&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chmod -R a+x abc&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td&gt;chmod -R 001 .&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;        &lt;td width=&quot;242&quot;&gt;         &lt;table cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot;&gt;&lt;tbody&gt;             &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Changing the permission of file for user &amp;lt;u&amp;gt;, group &amp;lt;g&amp;gt;, others &amp;lt;o&amp;gt; or all &amp;lt;a&amp;gt; with + as assign , - as remove and = as absolute permission.r read&amp;lt;4&amp;gt;, w write&amp;lt;2&amp;gt; and x execute&amp;lt;1&amp;gt;.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;&amp;#160;&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;Recursively changes the permission to execute for all directory and sub directory in abc directory for all users.&lt;/td&gt;             &lt;/tr&gt;              &lt;tr&gt;               &lt;td width=&quot;1233&quot;&gt;. Indicate the current directory.&lt;/td&gt;             &lt;/tr&gt;           &lt;/tbody&gt;&lt;/table&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/8173741244657400050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/basic-commands-part1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/8173741244657400050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/8173741244657400050'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/basic-commands-part1.html' title='Basic Commands Part1'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-8482130842520401967</id><published>2011-03-24T07:11:00.001-07:00</published><updated>2011-03-24T07:46:34.576-07:00</updated><title type='text'>Why do we Use Shell Scripting</title><content type='html'>&lt;p&gt;We use Shell Scripts to obtain the following purposes.&lt;/p&gt;  &lt;p&gt;1. Customizing your work environment.&lt;/p&gt;  &lt;p&gt;2. Automating Your Daily Task.&lt;/p&gt;  &lt;p&gt;3.Automating Repetitive Task.&lt;/p&gt;  &lt;p&gt;4.Executing Important Procedures like shutting down the system,formatting a disk,Creating a file system on it,mounting the file system,letting the users use the floppy and finally un mounting the disk.&lt;/p&gt;  &lt;p&gt;5.Performing the same operation on many files.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When Not to use Shell Scripting : &lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Is too complex,such as writing an entire billing system.&lt;/li&gt;    &lt;li&gt;Requires a high degree of efficiency&lt;/li&gt;    &lt;li&gt;Requires a variety of Software tools.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Usage of Shell Scripts with in Informatica:&lt;/p&gt;  &lt;p&gt;1.To run an batch via pmcmd.&lt;/p&gt;  &lt;p&gt;2. To have header and footer in case we are goanna write to an flat file&lt;/p&gt;  &lt;p&gt;3.To run the command task.&lt;/p&gt;  &lt;p&gt;4. To update parameter file with session start time and end time&lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/8482130842520401967/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/why-do-we-use-shell-scripting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/8482130842520401967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/8482130842520401967'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/why-do-we-use-shell-scripting.html' title='Why do we Use Shell Scripting'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4790490757462136417.post-5289881423497076250</id><published>2011-03-24T06:57:00.001-07:00</published><updated>2011-03-24T06:57:48.968-07:00</updated><title type='text'>Introduction to Shell Scripting</title><content type='html'>&lt;p&gt;A &lt;b&gt;shell script&lt;/b&gt; is a &lt;a href=&quot;http://en.wikipedia.org/wiki/Scripting_language&quot;&gt;script&lt;/a&gt; written for the &lt;a href=&quot;http://en.wikipedia.org/wiki/Shell_%28computing%29&quot;&gt;shell&lt;/a&gt;, or &lt;a href=&quot;http://en.wikipedia.org/wiki/Command_line_interpreter&quot;&gt;command line interpreter&lt;/a&gt;, of an &lt;a href=&quot;http://en.wikipedia.org/wiki/Operating_system&quot;&gt;operating system&lt;/a&gt;. It is often considered a simple &lt;a href=&quot;http://en.wikipedia.org/wiki/Domain-specific_programming_language&quot;&gt;domain-specific programming language&lt;/a&gt;. Typical operations performed by shell scripts include file manipulation, program execution, and printing text.&lt;/p&gt;  &lt;p&gt;&lt;font color=&quot;#ff0000&quot;&gt;&lt;strong&gt;Types of shell scripts :&lt;/strong&gt; &lt;/font&gt;&lt;font color=&quot;#000000&quot;&gt;Basically we have three types of the shell scripts [Most Prominent one’s ,widely used in industry].&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. Bourne Shell :&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The &lt;b&gt;Bourne shell&lt;/b&gt;, or &lt;b&gt;sh&lt;/b&gt;, was the default &lt;a href=&quot;http://en.wikipedia.org/wiki/Unix_shell&quot;&gt;Unix shell&lt;/a&gt; of &lt;a href=&quot;http://en.wikipedia.org/wiki/Version_7_Unix&quot;&gt;Unix Version 7&lt;/a&gt;, and replaced the &lt;a href=&quot;http://en.wikipedia.org/wiki/Thompson_shell&quot;&gt;Thompson shell&lt;/a&gt;, whose executable file had the same name, &lt;b&gt;sh&lt;/b&gt;. It was developed by &lt;a href=&quot;http://en.wikipedia.org/wiki/Stephen_Bourne&quot;&gt;Stephen Bourne&lt;/a&gt;, of &lt;a href=&quot;http://en.wikipedia.org/wiki/AT%26T&quot;&gt;AT&amp;amp;T&lt;/a&gt; &lt;a href=&quot;http://en.wikipedia.org/wiki/Bell_Laboratories&quot;&gt;Bell Laboratories&lt;/a&gt;, and was released in 1977 in the &lt;a href=&quot;http://en.wikipedia.org/wiki/Version_7_Unix&quot;&gt;Version 7 Unix&lt;/a&gt; release distributed to colleges and universities. It remains a popular default shell for Unix accounts. The &lt;a href=&quot;http://en.wikipedia.org/wiki/Executable&quot;&gt;binary&lt;/a&gt; program of the Bourne shell or a compatible program is located at &lt;code&gt;/bin/sh&lt;/code&gt; on most &lt;a href=&quot;http://en.wikipedia.org/wiki/Unix&quot;&gt;Unix&lt;/a&gt; systems, and is still the default shell for the root &lt;a href=&quot;http://en.wikipedia.org/wiki/Superuser&quot;&gt;superuser&lt;/a&gt; on many current Unix implementations.&lt;/p&gt;  &lt;p&gt;Features of the Bourne shell include:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Scripts can be invoked as commands by using their filename &lt;/li&gt;    &lt;li&gt;May be used interactively or non-interactively &lt;/li&gt;    &lt;li&gt;Allow both synchronous and asynchronous execution of commands &lt;/li&gt;    &lt;li&gt;supports input and output redirection and pipelines &lt;/li&gt;    &lt;li&gt;provides a set of built-in commands &lt;/li&gt;    &lt;li&gt;provides flow control constructs, quotation facilities, and functions. &lt;/li&gt;    &lt;li&gt;typeless variables &lt;/li&gt;    &lt;li&gt;provides local and global variable scope &lt;/li&gt;    &lt;li&gt;scripts do not require compilation before execution &lt;/li&gt;    &lt;li&gt;does not have a goto facility, so code restructuring may be necessary &lt;/li&gt;    &lt;li&gt;&lt;i&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Command_substitution&quot;&gt;Command substitution&lt;/a&gt;&lt;/i&gt; using back quotes: &lt;code&gt;`command`&lt;/code&gt;. &lt;/li&gt;    &lt;li&gt;&lt;i&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Here_document&quot;&gt;Here documents&lt;/a&gt;&lt;/i&gt; using &lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; to embed a block of input text within a script. &lt;/li&gt;    &lt;li&gt;&amp;quot;&lt;i&gt;&lt;code&gt;for ~ do ~ done&lt;/code&gt;&lt;/i&gt;&amp;quot; loops, in particular the use of &lt;code&gt;$*&lt;/code&gt; to loop over arguments. &lt;/li&gt;    &lt;li&gt;&amp;quot;&lt;i&gt;&lt;code&gt;case ~ in ~ esac&lt;/code&gt;&lt;/i&gt;&amp;quot; selection mechanism, primarily intended to assist argument parsing. &lt;/li&gt;    &lt;li&gt;&lt;i&gt;&lt;code&gt;sh&lt;/code&gt;&lt;/i&gt; provided support for environment variables using keyword parameters and exportable variables. &lt;/li&gt;    &lt;li&gt;It contains strong provisions for controlling input and output and in its expression matching facilities. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;2. C Shell :&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The &lt;b&gt;C shell&lt;/b&gt; (&lt;b&gt;csh&lt;/b&gt; or the improved version, &lt;b&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Tcsh&quot;&gt;tcsh&lt;/a&gt;&lt;/b&gt;, on most machines) is a &lt;a href=&quot;http://en.wikipedia.org/wiki/Unix_shell&quot;&gt;Unix shell&lt;/a&gt; that was created by &lt;a href=&quot;http://en.wikipedia.org/wiki/Bill_Joy&quot;&gt;Bill Joy&lt;/a&gt; while a graduate student at &lt;a href=&quot;http://en.wikipedia.org/wiki/University_of_California,_Berkeley&quot;&gt;University of California, Berkeley&lt;/a&gt; in the late 1970s.&lt;/p&gt;  &lt;p&gt;The C shell is a &lt;a href=&quot;http://en.wikipedia.org/wiki/Command-line_interpreter&quot;&gt;command processor&lt;/a&gt; that&#39;s typically run in a text window, allowing the user to type commands which cause actions. The C shell can also read commands from a file, called a &lt;a href=&quot;http://en.wikipedia.org/wiki/Shell_script&quot;&gt;script&lt;/a&gt;. Like all Unix shells, it supports filename &lt;a href=&quot;http://en.wikipedia.org/wiki/Wildcard_character&quot;&gt;wildcarding&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Pipeline_%28Unix%29&quot;&gt;piping&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Here_document&quot;&gt;here documents&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Command_substitution&quot;&gt;command substitution&lt;/a&gt;, &lt;a href=&quot;http://en.wikipedia.org/wiki/Variable_%28programming%29&quot;&gt;variables&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Control_flow&quot;&gt;control structures&lt;/a&gt; for &lt;a href=&quot;http://en.wikipedia.org/wiki/Conditional_%28programming%29&quot;&gt;condition-testing&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/Iteration&quot;&gt;iteration&lt;/a&gt;. What differentiated the C shell, especially in the 1980s, were its interactive features and overall style. Its new features made it easier and faster to use. The overall style of the language looked more like &lt;a href=&quot;http://en.wikipedia.org/wiki/C_%28programming_language%29&quot;&gt;C&lt;/a&gt; and was seen as more readable.&lt;/p&gt;  &lt;p&gt;Features of C Shell :&lt;/p&gt;  &lt;p&gt;Some of the features of the C shell are listed here: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href=&quot;http://www.eng.hawaii.edu/Tutor/csh.html#custom&quot;&gt;Customizable&lt;/a&gt; environment. &lt;/li&gt;    &lt;li&gt;Abbreviate commands. (&lt;a href=&quot;http://www.eng.hawaii.edu/Tutor/csh.html#alias&quot;&gt;Aliases&lt;/a&gt;.) &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.eng.hawaii.edu/Tutor/csh.html#history&quot;&gt;History&lt;/a&gt;. (Remembers commands typed before.) &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.eng.hawaii.edu/Tutor/csh.html#jobs&quot;&gt;Job control&lt;/a&gt;. (Run programs in the background or foreground.) &lt;/li&gt;    &lt;li&gt;&lt;a href=&quot;http://www.eng.hawaii.edu/Tutor/csh.html#scripts&quot;&gt;Shell scripting&lt;/a&gt;. (One can write programs using the shell.) &lt;/li&gt;    &lt;li&gt;Keyboard &lt;a href=&quot;http://www.eng.hawaii.edu/Tutor/csh.html#keys&quot;&gt;shortcuts&lt;/a&gt;. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;3. Korn Shell : &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;The &lt;b&gt;Korn shell&lt;/b&gt; (&lt;b&gt;ksh&lt;/b&gt;) is a &lt;a href=&quot;http://en.wikipedia.org/wiki/Unix_shell&quot;&gt;Unix shell&lt;/a&gt; which was developed by &lt;a href=&quot;http://en.wikipedia.org/wiki/David_Korn_%28computer_scientist%29&quot;&gt;David Korn&lt;/a&gt; (&lt;a href=&quot;http://en.wikipedia.org/wiki/Bell_Labs&quot;&gt;AT&amp;amp;T Bell Laboratories&lt;/a&gt;) in the early 1980s and announced at Toronto USENIX on July 14 1983&lt;/p&gt;  &lt;p&gt;ksh is backwards-compatible with the &lt;a href=&quot;http://en.wikipedia.org/wiki/Bourne_shell&quot;&gt;Bourne shell&lt;/a&gt; and includes many features of the &lt;a href=&quot;http://en.wikipedia.org/wiki/C_shell&quot;&gt;C shell&lt;/a&gt; as well, such as a &lt;a href=&quot;http://en.wikipedia.org/wiki/Command_history&quot;&gt;command history&lt;/a&gt;, which was inspired by the requests of Bell Labs users.&lt;/p&gt;  &lt;p&gt;The Korn shell&#39;s major new features include:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;p&gt;&lt;a name=&quot;AUTOID-91&quot;&gt;&lt;/a&gt;&lt;a name=&quot;AUTOID-93&quot;&gt;&lt;/a&gt;&lt;b&gt;Command-line editing&lt;/b&gt; , allowing you to use &lt;em&gt;vi&lt;/em&gt; or &lt;em&gt;emacs&lt;/em&gt; -style editing commands on your command lines.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;a name=&quot;AUTOID-100&quot;&gt;&lt;/a&gt;&lt;a name=&quot;AUTOID-102&quot;&gt;&lt;/a&gt;&lt;a name=&quot;AUTOID-104&quot;&gt;&lt;/a&gt;&lt;a name=&quot;AUTOID-106&quot;&gt;&lt;/a&gt;&lt;b&gt;Integrated programming features&lt;/b&gt; : the functionality of several external UNIX commands, including &lt;em&gt;test&lt;/em&gt; , &lt;em&gt;expr&lt;/em&gt; , &lt;em&gt;getopt&lt;/em&gt; , and &lt;em&gt;echo&lt;/em&gt; , has been integrated into the shell itself, enabling common programming tasks to be done more cleanly and without creating extra processes.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;a name=&quot;AUTOID-115&quot;&gt;&lt;/a&gt;&lt;b&gt;Control structures&lt;/b&gt; , especially the &lt;b&gt;select&lt;/b&gt; construct, which enables easy menu generation.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;a name=&quot;AUTOID-121&quot;&gt;&lt;/a&gt;&lt;b&gt;Debugging primitives&lt;/b&gt; that make it possible to write tools that help programmers debug their shell code.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;a name=&quot;AUTOID-127&quot;&gt;&lt;/a&gt;&lt;a name=&quot;AUTOID-129&quot;&gt;&lt;/a&gt;&lt;a name=&quot;AUTOID-131&quot;&gt;&lt;/a&gt;&lt;b&gt;Regular expressions&lt;/b&gt; , well known to users of UNIX utilities like &lt;em&gt;grep&lt;/em&gt; and &lt;em&gt;awk&lt;/em&gt; , have been added to the standard set of filename wildcards and to the shell variable facility.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;a name=&quot;AUTOID-138&quot;&gt;&lt;/a&gt;&lt;b&gt;Advanced I/O features&lt;/b&gt; , including the ability to do two-way communication with concurrent processes (&lt;em&gt;coroutines&lt;/em&gt; ).&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;New options and variables&lt;/b&gt; that give you more ways to customize your environment.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;b&gt;Increased speed&lt;/b&gt; of shell code execution.&lt;/p&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;p&gt;&lt;a name=&quot;AUTOID-150&quot;&gt;&lt;/a&gt;&lt;b&gt;Security features&lt;/b&gt; that help protect against &amp;quot;Trojan horses&amp;quot; and other types of break-in schemes.&lt;/p&gt;   &lt;/li&gt; &lt;/ul&gt;  </content><link rel='replies' type='application/atom+xml' href='http://unixshellscripts.blogspot.com/feeds/5289881423497076250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/introduction-to-shell-scripting.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/5289881423497076250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4790490757462136417/posts/default/5289881423497076250'/><link rel='alternate' type='text/html' href='http://unixshellscripts.blogspot.com/2011/03/introduction-to-shell-scripting.html' title='Introduction to Shell Scripting'/><author><name>Naveen</name><uri>http://www.blogger.com/profile/01892407690516075293</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry></feed>