<?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: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-7366258948420632812</id><updated>2012-03-18T01:26:01.984-07:00</updated><title type='text'>naveenbos</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-5034576730324302758</id><published>2011-07-07T23:38:00.001-07:00</published><updated>2011-07-07T23:38:51.433-07:00</updated><title type='text'>Previous search in php using session</title><content type='html'>http://stackoverflow.com/questions/5754957/how-to-add-visited-pages-urls-into-a-session-array&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-5034576730324302758?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/5034576730324302758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2011/07/previous-search-in-php-using-session.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/5034576730324302758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/5034576730324302758'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2011/07/previous-search-in-php-using-session.html' title='Previous search in php using session'/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-138653395405682995</id><published>2011-05-27T01:32:00.000-07:00</published><updated>2011-05-27T01:36:20.936-07:00</updated><title type='text'>Toggle div using CSS and Jquery</title><content type='html'>http://www.sohtanaka.com/web-design/easy-toggle-jquery-tutorial/&lt;br /&gt;&lt;br /&gt;demo&lt;br /&gt;http://www.sohtanaka.com/web-design/examples/toggle/#&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-138653395405682995?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/138653395405682995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2011/05/toggle-div-using-ajax-and-jquery.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/138653395405682995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/138653395405682995'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2011/05/toggle-div-using-ajax-and-jquery.html' title='Toggle div using CSS and Jquery'/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-3268927012273656069</id><published>2010-05-19T04:43:00.000-07:00</published><updated>2010-05-19T04:46:45.081-07:00</updated><title type='text'>gsmsmsd  an smsserver</title><content type='html'>&lt;h1&gt;&lt;a href="http://pwet.fr/man/linux/administration_systeme/gsmsmsd"&gt;man gsmsmsd&lt;/a&gt; (&lt;a href="http://pwet.fr/man/linux/administration_systeme"&gt;8&lt;/a&gt;) - SMS message reception daemon&lt;/h1&gt;     &lt;div class="pubman"&gt; &lt;script type="text/javascript"&gt;&lt;!-- google_ad_client = "pub-7171863654720058"; /* 728x90, date de création 03/08/08 */ google_ad_slot = "2353361095"; google_ad_width = 728; google_ad_height = 90; //--&gt; &lt;/script&gt; &lt;script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"&gt; &lt;/script&gt;     &lt;/div&gt;           &lt;h2&gt;NAME&lt;/h2&gt;&lt;div class="part"&gt;&lt;p&gt;gsmsmsd - SMS message reception daemon &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/div&gt;&lt;h2&gt;SYNOPSIS&lt;/h2&gt;&lt;div class="part"&gt;&lt;p&gt;&lt;b&gt;gsmsmsd&lt;/b&gt; [ &lt;b&gt;-a&lt;/b&gt; &lt;i&gt;action&lt;/i&gt; ] [ &lt;b&gt;--action&lt;/b&gt; &lt;i&gt;action&lt;/i&gt; ] [ &lt;b&gt;-b&lt;/b&gt; &lt;i&gt;baudrate&lt;/i&gt; ] [ &lt;b&gt;--baudrate&lt;/b&gt; &lt;i&gt;baudrate&lt;/i&gt; ] [ &lt;b&gt;-c&lt;/b&gt; &lt;i&gt;concatenatedID&lt;/i&gt; ] [ &lt;b&gt;--concatenate&lt;/b&gt; &lt;i&gt;concatenatedID&lt;/i&gt; ] [ &lt;b&gt;-C&lt;/b&gt; &lt;i&gt;service centre address&lt;/i&gt; ] [ &lt;b&gt;--sca&lt;/b&gt; &lt;i&gt;service centre address&lt;/i&gt; ] [ &lt;b&gt;-d&lt;/b&gt; &lt;i&gt;device&lt;/i&gt; ] [ &lt;b&gt;--device&lt;/b&gt; &lt;i&gt;device&lt;/i&gt; ] [ &lt;b&gt;-D&lt;/b&gt; ] [ &lt;b&gt;--direct&lt;/b&gt; ] [ &lt;b&gt;-f&lt;/b&gt; ] [ &lt;b&gt;--flush&lt;/b&gt; ] [ &lt;b&gt;-h&lt;/b&gt; ] [ &lt;b&gt;--help&lt;/b&gt; ] [ &lt;b&gt;-I&lt;/b&gt; &lt;i&gt;init string&lt;/i&gt; ] [ &lt;b&gt;--init&lt;/b&gt; &lt;i&gt;init string&lt;/i&gt; ] [ &lt;b&gt;-r&lt;/b&gt; ] [ &lt;b&gt;--requeststat&lt;/b&gt; ] [ &lt;b&gt;-s&lt;/b&gt; &lt;i&gt;spool directory&lt;/i&gt; ] [ &lt;b&gt;--spool&lt;/b&gt; &lt;i&gt;spool directory&lt;/i&gt; ] [ &lt;b&gt;-t&lt;/b&gt; &lt;i&gt;SMS store name&lt;/i&gt; ] [ &lt;b&gt;--store&lt;/b&gt; &lt;i&gt;SMS store name&lt;/i&gt; ] [ &lt;b&gt;-v&lt;/b&gt; ] [ &lt;b&gt;--version&lt;/b&gt; ] [ &lt;b&gt;-X&lt;/b&gt; ] [ &lt;b&gt;--xonxoff&lt;/b&gt; ] { &lt;i&gt;sms_type&lt;/i&gt; } &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/div&gt;&lt;h2&gt;DESCRIPTION&lt;/h2&gt;&lt;div class="part"&gt;&lt;p&gt;&lt;i&gt;gsmsmsd&lt;/i&gt; reads new incoming SMS from the mobile phone and dispatches them to a user-defined action. Additionally it can send SMS  message that it reads from a spooldir. &lt;/p&gt;&lt;p&gt; &lt;i&gt;gsmsmsd&lt;/i&gt; attaches itself to the &lt;i&gt;device&lt;/i&gt; given on the command line (usually an GSM modem) using the specified &lt;i&gt;baudrate&lt;/i&gt; and waits for incoming SMS messages. If no &lt;i&gt;device&lt;/i&gt; is given, the device &lt;i&gt;/dev/mobilephone&lt;/i&gt; is used. If no &lt;i&gt;baudrate&lt;/i&gt; is given, a default baud rate of 38400 is used. &lt;/p&gt;&lt;p&gt; If no action is given, the SMS message is printed to the standard output. If an &lt;i&gt;action&lt;/i&gt; is specified the &lt;i&gt;action&lt;/i&gt; is excecuted using the shell and the SMS message is written to the standard input of the action. &lt;/p&gt;&lt;p&gt; &lt;i&gt;gsmsmsd&lt;/i&gt; needs one empty storage slot for SMS messages in the mobile phone, otherwise SMS reception will not work. The SMS store to use for temporary storage of incoming SMS can be selected using the &lt;b&gt;--store&lt;/b&gt; option, otherwise the ME default store is used. &lt;/p&gt;&lt;p&gt; To terminate &lt;i&gt;gsmsmsd&lt;/i&gt; cleanly (without losing SMS messages) one should send either SIGINT (CTRL-C on the command line) or SIGTERM to the process. &lt;/p&gt;&lt;p&gt; Error messages are printed to the standard error output.  If the program terminates on error the error code 1 is returned. &lt;/p&gt;&lt;p&gt; &lt;i&gt;sms_type&lt;/i&gt; may be any combination of: &lt;/p&gt;&lt;dl&gt;&lt;dt&gt;&lt;i&gt;sms&lt;/i&gt;, &lt;i&gt;no_sms&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;Controls reception of normal SMS messages. &lt;/dd&gt;&lt;dt&gt;&lt;i&gt;cb&lt;/i&gt;, &lt;i&gt;no_cb&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;Controls reception of cell broadcast messages. &lt;/dd&gt;&lt;dt&gt;&lt;i&gt;stat&lt;/i&gt;, &lt;i&gt;no_stat&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;Controls reception of status reports. &lt;/dd&gt;&lt;/dl&gt;&lt;p&gt; The default is &lt;i&gt;sms&lt;/i&gt;, &lt;i&gt;cb&lt;/i&gt;, and &lt;i&gt;stat&lt;/i&gt;. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;/div&gt;&lt;h2&gt;OPTIONS&lt;/h2&gt;&lt;div class="part"&gt;&lt;dl&gt;&lt;dt&gt;&lt;b&gt;-a&lt;/b&gt; &lt;i&gt;action&lt;/i&gt;, &lt;b&gt;--action&lt;/b&gt; &lt;i&gt;action&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;The action to execute for each incoming SMS message. If no action  is given the SMS is written to the standard output. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-b&lt;/b&gt; &lt;i&gt;baudrate&lt;/i&gt;, &lt;b&gt;--baudrate&lt;/b&gt; &lt;i&gt;baudrate&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;The baud rate to use. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-c&lt;/b&gt; &lt;i&gt;concatenatedID&lt;/i&gt;, &lt;b&gt;--concatenate&lt;/b&gt; &lt;i&gt;concatenatedID&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;If an ID is given, large SMSs are split into several, concatenated SMSs. All SMSs have the same ID and are numbered consecutively so that  the receiving phone can assemble them in the correct order. IDs must be in the range 0..255. This number is increased by one for every outgoing concatenated SMS and wraps around after 255. Not all receiving phones will support concatenated SMSs (and display them as separate SMSs), since all the numbering and ID information is carried in the user data header element at the beginning of the SMS user data. This information may show up as garbage in such phones. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-C&lt;/b&gt; &lt;i&gt;service centre address&lt;/i&gt;, &lt;b&gt;--sca&lt;/b&gt; &lt;i&gt;service centre address&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;Sets the service centre address to use for all SUBMIT SMSs (may not work with some phones). &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-d&lt;/b&gt; &lt;i&gt;device&lt;/i&gt;, &lt;b&gt;--device&lt;/b&gt; &lt;i&gt;device&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;The device to which the GSM modem is connected. The default is &lt;i&gt;/dev/mobilephone&lt;/i&gt;. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-D&lt;/b&gt;, &lt;b&gt;--direct&lt;/b&gt; &lt;/dt&gt;&lt;dd&gt;Enables direct routing of incoming SMS messages to the TE. This is not supported by many mobile phone/GSM modem combinations. Therefore, the default is to store incoming SMS temporarily before processing them in  the indicated store. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-f&lt;/b&gt;, &lt;b&gt;--flush&lt;/b&gt; &lt;/dt&gt;&lt;dd&gt;This option causes &lt;i&gt;gsmsmsd&lt;/i&gt; to flush (ie. read and erase) existing SMS messages from the SMS store selected by the &lt;b&gt;--store&lt;/b&gt; option. The action given by the &lt;b&gt;--action&lt;/b&gt; option is executed on each of the flushed SMS. This option should be used to ensure that enough space is available in the SMS store for temporary storage of incoming SMS, otherwise incoming SMS might be ignored silently by the ME. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-h&lt;/b&gt;, &lt;b&gt;--help&lt;/b&gt; &lt;/dt&gt;&lt;dd&gt;Prints an option summary. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-I&lt;/b&gt; &lt;i&gt;init string&lt;/i&gt;, &lt;b&gt;--init&lt;/b&gt; &lt;i&gt;init string&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;Initialization string to send to the TA (default: "E0"). Note that the sequence "ATZ" is sent first. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-r&lt;/b&gt;, &lt;b&gt;--requeststat&lt;/b&gt; &lt;/dt&gt;&lt;dd&gt;Request status reports for sent SMS. Note: This option only makes sense if the phone supports routing of status reports to the TE. Otherwise the status reports might show on the phone's display or get lost. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-s&lt;/b&gt; &lt;i&gt;spool directory&lt;/i&gt;, &lt;b&gt;--spool&lt;/b&gt; &lt;i&gt;spool directory&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;This option sets the spool directory where &lt;i&gt;gsmsmsd&lt;/i&gt; expects SMS messages to send. The format of SMS files is very simple: The first line contains the phone number of the recipient. Everything else after  the first line is interpreted as the SMS text. Please refer to  &lt;b&gt;&lt;a href="http://pwet.fr/man/linux/commandes/gsmsendsms"&gt;gsmsendsms&lt;/a&gt;(&lt;a href="http://pwet.fr/man/linux/commandes"&gt;1&lt;/a&gt;)&lt;/b&gt; for details on the SMS text character set and maximum length. &lt;i&gt;gsmsmsd&lt;/i&gt; polls the spool directory every 5 seconds. Sent SMS message files are removed. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-t&lt;/b&gt; &lt;i&gt;SMS store name&lt;/i&gt;, &lt;b&gt;--store&lt;/b&gt; &lt;i&gt;SMS store name&lt;/i&gt; &lt;/dt&gt;&lt;dd&gt;The name of the SMS store to read from (for the &lt;b&gt;--flush&lt;/b&gt; option) or write to (for temporary SMS storage). This option must be must be used in conjunction with the &lt;b&gt;--flush&lt;/b&gt; option. If this option is omitted the ME uses it's default SMS store for temporary storage of incoming SMS. A commonly available message store is "SM" (SIM card). &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-v&lt;/b&gt;, &lt;b&gt;--version&lt;/b&gt; &lt;/dt&gt;&lt;dd&gt;Prints the program version. &lt;/dd&gt;&lt;dt&gt;&lt;b&gt;-X&lt;/b&gt;, &lt;b&gt;--xonxoff&lt;/b&gt; &lt;/dt&gt;&lt;dd&gt;Uses software handshaking (XON/XOFF) for accessing the device. &lt;/dd&gt;&lt;/dl&gt;&lt;p&gt; &lt;/p&gt;&lt;/div&gt;&lt;h2&gt;EXAMPLES&lt;/h2&gt;&lt;p&gt;The following invocation of &lt;i&gt;gsmsmsd&lt;/i&gt; sends each incoming SMS message as a mail to the user "smsadmin": &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;pre&gt;gsmsmsd -d /dev/ttyS2 -b 19200 -a "mail smsadmin"&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; This is the format of SMS deliver messages as output from &lt;i&gt;gsmsmsd&lt;/i&gt;: &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;pre&gt;----------------------------------------------------------------&lt;br /&gt;Message type: SMS-DELIVER&lt;br /&gt;SC address: '491710762100'&lt;br /&gt;More messages to send: 1&lt;br /&gt;Reply path: 0&lt;br /&gt;User data header indicator: 0&lt;br /&gt;Status report indication: 0&lt;br /&gt;Originating address: '01805000102'&lt;br /&gt;Protocol identifier: 0x39&lt;br /&gt;Data coding scheme: default alphabet&lt;br /&gt;SC timestamp: 17.12.98 14:10:55(+0100)&lt;br /&gt;User data length: 159&lt;br /&gt;User data header: 0x&lt;br /&gt;User data: 'Nicht vergessen! Die XtraWeihnachtsverlosung lauft&lt;br /&gt;noch bis zum 24.12. Nutzen Sie jetzt Ihre Gewinnchance und faxen&lt;br /&gt;Sie Ihren Teiln.-Gutschein an 0180/5000 056'&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; This is the format of SMS status report messages as output from &lt;i&gt;gsmsmsd&lt;/i&gt;: &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;pre&gt;----------------------------------------------------------------&lt;br /&gt;Message type: SMS-STATUS-REPORT&lt;br /&gt;SC address: ''&lt;br /&gt;More messages to send: 0&lt;br /&gt;Status report qualifier: 0&lt;br /&gt;Message reference: 0&lt;br /&gt;Recipient address: ''&lt;br /&gt;SC timestamp: 00.00.00 00:00:00(+0000)&lt;br /&gt;Discharge time: 00.00.00 00:00:00(+0000)&lt;br /&gt;Status: 0x0 'Short message received by the SME'&lt;br /&gt;----------------------------------------------------------------&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-3268927012273656069?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/3268927012273656069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/05/gsmsmsd-smsserver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/3268927012273656069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/3268927012273656069'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/05/gsmsmsd-smsserver.html' title='gsmsmsd  an smsserver'/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-8017455420274535522</id><published>2010-02-03T06:25:00.001-08:00</published><updated>2010-02-03T06:28:37.942-08:00</updated><title type='text'></title><content type='html'>&lt;a href="http://zetcode.com/tutorials/pyqt4/" class="external free" title="http://zetcode.com/tutorials/pyqt4/" rel="nofollow"&gt;http://zetcode.com/tutorials/pyqt4/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-8017455420274535522?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/8017455420274535522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/02/httpzetcode.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/8017455420274535522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/8017455420274535522'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/02/httpzetcode.html' title=''/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-1945889524468821174</id><published>2010-02-03T05:26:00.000-08:00</published><updated>2010-02-03T05:39:29.520-08:00</updated><title type='text'></title><content type='html'>&lt;p&gt;&lt;a href="http://www.cahilig.net/2008/07/04/how-setup-lan-dns-server-using-bind9-under-debian-and-ubuntu-linux" class="external free" title="http://www.cahilig.net/2008/07/04/how-setup-lan-dns-server-using-bind9-under-debian-and-ubuntu-linux" rel="nofollow"&gt;http://www.cahilig.net/2008/07/04/how-setup-lan-dns-server-using-bind9-under-debian-and-ubuntu-linux&lt;/a&gt;  (for dns server setting)&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://docs.python.org/distutils/setupscript.html" class="external free" title="http://docs.python.org/distutils/setupscript.html" rel="nofollow"&gt;http://docs.python.org/distutils/setupscript.html&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt; &lt;a href="https://wiki.ubuntu.com/PackagingGuide/Python" class="external free" title="https://wiki.ubuntu.com/PackagingGuide/Python" rel="nofollow"&gt;https://wiki.ubuntu.com/PackagingGuide/Python&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://linuxgazette.net/133/cherian.html" class="external free" title="http://linuxgazette.net/133/cherian.html" rel="nofollow"&gt;http://linuxgazette.net/133/cherian.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://twistedmatrix.com/documents/current/core/howto/servers.html" class="external free" title="http://twistedmatrix.com/documents/current/core/howto/servers.html" rel="nofollow"&gt;http://twistedmatrix.com/documents/current/core/howto/servers.html&lt;/a&gt; &lt;/p&gt;&lt;p&gt;&lt;a href="http://en.wikibooks.org/wiki/Bourne_Shell_Scripting/Redirection" class="external free" title="http://en.wikibooks.org/wiki/Bourne_Shell_Scripting/Redirection" rel="nofollow"&gt;http://en.wikibooks.org/wiki/Bourne_Shell_Scripting/Redirection&lt;/a&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-1945889524468821174?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/1945889524468821174/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/02/httpwww.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/1945889524468821174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/1945889524468821174'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/02/httpwww.html' title=''/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-7096799130731328235</id><published>2010-02-03T04:51:00.000-08:00</published><updated>2010-02-03T05:00:50.800-08:00</updated><title type='text'></title><content type='html'>&lt;ul&gt;&lt;li&gt;  &lt;a href="http://gcc.gnu.org/onlinedocs/gcc-3.4.5/gcc.pdf" class="external text" title="http://gcc.gnu.org/onlinedocs/gcc-3.4.5/gcc.pdf" rel="nofollow"&gt;Using the GNU Compiler Collection (GCC)&lt;/a&gt; &lt;/li&gt;&lt;li&gt;  &lt;a href="http://www.gnu.org/software/make/manual/make.pdf" class="external text" title="http://www.gnu.org/software/make/manual/make.pdf" rel="nofollow"&gt;Gnu Make&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://sourceforge.net/projects/qce-ga/files/qc-usb/0.6.6/qc-usb-0.6.6.tar.gz/download" class="external text" title="http://sourceforge.net/projects/qce-ga/files/qc-usb/0.6.6/qc-usb-0.6.6.tar.gz/download" rel="nofollow"&gt;Example for downloading and making software (qc-usb)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.esearchbook.com/files/30/eSearchBook.1192110892.Beginning%20Shell%20Scripting.pdf" class="external text" title="http://www.esearchbook.com/files/30/eSearchBook.1192110892.Beginning%20Shell%20Scripting.pdf" rel="nofollow"&gt;Shell Scripting&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.ibiblio.org/g2swap/byteofpython/files/120/byteofpython_120.pdf" class="external text" title="http://www.ibiblio.org/g2swap/byteofpython/files/120/byteofpython_120.pdf" rel="nofollow"&gt;Byte of Python&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.zoteca.com/information/wp/twistedusenix.pdf" class="external text" title="http://www.zoteca.com/information/wp/twistedusenix.pdf" rel="nofollow"&gt;python-twisted tutorial&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://svnbook.red-bean.com/en/1.5/svn-book.pdf" class="external text" title="http://svnbook.red-bean.com/en/1.5/svn-book.pdf" rel="nofollow"&gt;subversion Book&lt;/a&gt;&lt;/li&gt;&lt;li&gt;  &lt;a href="http://docs.python.org/distutils/index.html" class="external text" title="http://docs.python.org/distutils/index.html" rel="nofollow"&gt;debian packaging using distutils&lt;/a&gt; &lt;/li&gt;&lt;li&gt;   &lt;a href="https://wiki.ubuntu.com/PackagingGuide/Python" class="external text" title="https://wiki.ubuntu.com/PackagingGuide/Python" rel="nofollow"&gt;debian packaging guide (for python)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;  &lt;a href="http://www.linuxfromscratch.org/lfs/downloads/stable/LFS-BOOK-6.5.pdf" class="external text" title="http://www.linuxfromscratch.org/lfs/downloads/stable/LFS-BOOK-6.5.pdf" rel="nofollow"&gt;Linux From Scratch Book&lt;/a&gt; &lt;/li&gt;&lt;li&gt;  &lt;a href="http://www.linuxfromscratch.org/lfs/downloads/6.5/LFS-BOOK-6.5-wget-list" class="external text" title="http://www.linuxfromscratch.org/lfs/downloads/6.5/LFS-BOOK-6.5-wget-list" rel="nofollow"&gt;Wget List for LFS6.5&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.cahilig.net/2008/07/04/how-setup-lan-dns-server-using-bind9-under-debian-and-ubuntu-linux" class="external text" title="http://www.cahilig.net/2008/07/04/how-setup-lan-dns-server-using-bind9-under-debian-and-ubuntu-linux" rel="nofollow"&gt;how to setup DNS LAN&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-7096799130731328235?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/7096799130731328235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/02/tutorials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/7096799130731328235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/7096799130731328235'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/02/tutorials.html' title=''/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-1023561605354245802</id><published>2010-02-03T04:49:00.001-08:00</published><updated>2010-04-29T23:36:13.655-07:00</updated><title type='text'></title><content type='html'>&lt;a href="http://www.oucs.ox.ac.uk/documentation/userguides/c/l922.pdf" class="external text" title="http://www.oucs.ox.ac.uk/documentation/userguides/c/l922.pdf" rel="nofollow"&gt;Programing in C (K&amp;amp;R)&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-1023561605354245802?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/1023561605354245802/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/02/programing-in-c-k.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/1023561605354245802'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/1023561605354245802'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/02/programing-in-c-k.html' title=''/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-4517871229066493165</id><published>2010-02-03T00:29:00.000-08:00</published><updated>2010-04-29T23:36:13.661-07:00</updated><title type='text'>shell terminal</title><content type='html'>   	&lt;meta equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt; 	&lt;title&gt;&lt;/title&gt; 	&lt;meta name="GENERATOR" content="OpenOffice.org 2.4  (Linux)"&gt; 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } 	--&gt; 	&lt;/style&gt;  &lt;p style="margin-bottom: 0cm;"&gt;             &lt;font size="5"&gt;&lt;b&gt;Shell in my terminal&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo "$LINES" &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;24  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo "$COLUMNS" &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;80  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $PS1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\$  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;FOR getting ENVIRONMENTAL VARIABLES&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ env  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;GPG_AGENT_INFO=/tmp/seahorse-auOGIL/S.gpg-agent:2903:1 &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;SHELL=/bin/bash  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;DESKTOP_STARTUP_ID=  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;TERM=xterm  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;GTK_RC_FILES=/etc/gtk/gtkrc:/home/catfoss/.gtkrc-1.2-gnome2 &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;WINDOWID=54549658  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;USER=catfoss  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36: &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;SSH_AUTH_SOCK=/tmp/keyring-qzx8xA/ssh  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;GNOME_KEYRING_SOCKET=/tmp/keyring-qzx8xA/socket &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;SESSION_MANAGER=local/catfoss4:/tmp/.ICE-unix/2848 &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;USERNAME=catfoss  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;DESKTOP_SESSION=default  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;PATH=/usr/local/bin:/usr/bin:/bin:/usr/games &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;GDM_XSERVER_LOCATION=local  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;PWD=/home/catfoss  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;LANG=en_US.UTF-8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;GNOME_KEYRING_PID=2847  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;GDM_LANG=en_US.UTF-8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;GDMSESSION=default  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;HISTCONTROL=ignoreboth  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;HOME=/home/catfoss  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;SHLVL=1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;GNOME_DESKTOP_SESSION_ID=Default  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;LOGNAME=catfoss  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;XDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usr/share/gdm/ &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-pd9mFs3Wzv,guid=b3581362d8a77a956e3b74a74b2854d2 &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;WINDOWPATH=7  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;DISPLAY=:0.0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;COLORTERM=gnome-terminal  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;XAUTHORITY=/home/catfoss/.Xauthority  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;_=/usr/bin/env  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;SHELLsh-3.2$ exit CHANGING&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ sh  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;sh-3.2$  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;sh-3.2$ exit  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ naveen="hai" &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $naveen  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;hai  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;space is used in the shell   for command  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ x=10  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $x  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;10  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ xn=Rani  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $xn  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;Rani  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ a=5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ b=6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $(($a+$b))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;11  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ x=20  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ y=5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $(($x/$y))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ x=20  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ y=5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ z=$x/$y  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $((z))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  echo `expr  $x  + $y`&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;IF ANY OPERATION IS FAILED WE CAN USE THIS&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a              ch                                    mithun.jpg  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aaa.py         circle.c                              naveen.py  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aa.py          circular1.c                           naveenpython.odt  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.c            circular.c                            naveen.ui  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.out          client                                pointer.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.py           client.txt                            QueueinC Files  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;arraystruct.c  client.txt~                           QueueinC.htm  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;athulya.odt    c.py                                  Ramsanwishescopy.jpg  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;athu.py        ctutor-1.pdf                          r.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;attr.html      Desktop                               rocks.gif  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.txt          d.py                                  shell termin.odt  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;bbb.py         EID12copy.jpg                         sort1.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;b.py           EID23copy.jpg                         stack2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;b.pyc          EIDMailanchi.jpg                      struct.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;b.txt          EidMubarak890.jpg                     structu.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;c              EssentialC-1.pdf                      summary Files  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal1.py        file:                                 summary.html  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal1.py~       g                                     test1.py  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal1.ui        getattr Files                         test.py  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal3.py        getattr.html                          test.py~  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal3.py~       kernal.odt                            test.ui  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal3.ui        list1.c                               untitled.ui  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal.py         list.c                                vi.txt  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal.py~        Menus and Toolbars in wxPython        z  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cal.ui         Menus and Toolbars in wxPython Files  z.txt  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ rm b.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;rm: cannot remove `b.c': No such file or directory  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $?  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ lss  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;bash: lss: command not found  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $?  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;127  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cp r.c /  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;cp: cannot create regular file `/r.c': Permission denied  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $?  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;EXAMPLE&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ vim a.sh  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo "your first name please:" &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;read fname  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo "hello $fname,Lets be a frnd!"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash a.sh  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;your first name please:  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;sah  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;hello sah,Lets be a frnd!  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo `expr 2 + 3`  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo $(expr 2 + 3)  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls *.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.c            circle.c     circular.c  list.c     r.c      struct.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;arraystruct.c  circular1.c  list1.c     pointer.c  sort1.c  structu.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls c.*  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;c.py  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls a*.*  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aaa.py  a.c    a.py           a.sh         athu.py    a.txt  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aa.py   a.out  arraystruct.c  athulya.odt  attr.html  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls a*.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.c  arraystruct.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls ?.*  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.c  a.out  a.py  a.sh  a.txt  b.py  b.pyc  b.txt  c.py  d.py  r.c  z.txt  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls a*.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.c  arraystruct.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls ?.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a.c  r.c  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;deterministic finite automata&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ ls [a,b]*  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;a       aa.py  a.out  arraystruct.c  athulya.odt  attr.html  bbb.py  b.pyc  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aaa.py  a.c    a.py   a.sh           athu.py      a.txt      b.py    b.txt  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat &gt;test1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;/home(then press ctrl+d)catfoss@catfoss4:~$ cat test1&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ sort  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;bos  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;navee  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;bos  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;navee  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat &gt;te  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;naveen  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;unnicatfoss@catfoss4:~$ sort  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ sort &lt;te&gt; &lt;/te&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0cm;"&gt;naveen  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;unni  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;dmesg:for system usage information&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;tail -n (no.)&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;or&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;tail -n&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;head -n&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;SORTING&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;ps -e | head -16 | tail -15 | sort -k 4 &gt; list  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="3"&gt;&lt;b&gt;BC arbitrary precision calculator language&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bc  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;bc 1.06.94  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;This is free software with ABSOLUTELY NO WARRANTY.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;For details type `warranty'.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3+5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4+2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4==4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4&lt;2&gt; &lt;/p&gt;&lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4!=3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;Bitwise and &amp;amp;&amp;amp; if two bit are one answer is one&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;PGM IN SHELL(USING IF ..ELSE)&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;if [ $1 -eq $2 ]  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;then  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  echo "same"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;else  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;if [ $1 -gt $2 ]  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;then  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo "greater"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;else  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo "less"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ vim fil  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash fil  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;same  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash fil 3 4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;less  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash fil 4 3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;greater  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash fil 4 4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;same  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;FOR LOOP&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ for i in 1 2 3 4 5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; echo $i  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;EX:&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ for (( i=0; i&lt;=5; i++ ))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; echo $i  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;PGM&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;for (( i=1; i&lt;=4; i++ ))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;        for (( j=1; j&lt;=4; j++ ))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;        do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;        echo -n $i  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;        done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; echo ""  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ vim bn.sh  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash bn.sh  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1111  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2222  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3333  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4444  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="3"&gt;&lt;b&gt;for colour change&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;atfoss@catfoss4:~$ echo -e "\033[43m" &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo -e "\033[49m" &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;WHILE LOOP&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;catfoss@catfoss4:~$ bos=1 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;catfoss@catfoss4:~$ while [ $bos -lt 10 ] &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&gt; do &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&gt; echo $bos &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&gt; bos=`expr $bos + 1` &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&gt; done &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;1 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;2 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;3 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;4 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;5 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;6 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;7 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;8 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;9 &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;STEP WAVE FORM&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;for (( i = 0; i &lt;= 9; i++ ))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;   for (( j = 1 ; j &lt;= i; j++ ))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  echo -e -n "\033[46m     "  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; echo -e -n "\033[49m"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; echo  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;      &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;      &lt;b&gt;CHESSBOARD  &lt;/b&gt;   &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;                &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;     for (( i=1; i&lt;=9; i++ ))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;        for (( j=1; j&lt;=9; j++ ))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  a=`expr $i + $j`  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; b=`expr $a % 2`  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; if [ $b  -eq 0 ];  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;then  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  echo -e -n "\033[43m  "  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;else  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  echo -e -n "\033[46m  "  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo -e -n "\033[49m"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; echo  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;                          &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;                               &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;        catfoss@catfoss4:~$ cat &gt; tr &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo $#  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash tr  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash tr 1 2 3 4  5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash tr 1 2 3 4  5 6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash tr 1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash tr 1 1 1 1 1 1 1 1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8                            &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;        &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ if [ -z $linda ]  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; then  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; echo "null"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;null  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash tr  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;high level&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;low level&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;machine code&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;microcode&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;assembly language&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;c is a middle level language,it can operate both high level and low level languages&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;CASE CONDITION&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ re="hello" &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ case $re in  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; "world")echo "1";; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; "hello")echo "2";; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; esac  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;FUN&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ fun()  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; {  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; echo "hello"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; cal  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; date  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; }  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ fun  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;hello  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;   December 2009     &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;Su Mo Tu We Th Fr Sa  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       1  2  3  4  5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; 6  7  8  9 10 11 12  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;13 14 15 16 17 18 19  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;20 21 22 23 24 25 26  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;27 28 29 30 31       &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;                     &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;Fri Dec 18 12:14:26 IST 2009  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;RECURSION&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ fun()  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; {  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; if [ $var -eq 0 ]  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; then  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; echo "ok"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; else var=`expr $var - 1`  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; echo $var  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; fun  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; }  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ var=5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ fun  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;ok  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;FOR DEBUGED OUT PUT&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;bash -x tr&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;EX:&lt;/b&gt;&lt;font style=""&gt;catfoss@catfoss4:~$ vim tr &lt;/font&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;var=5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo $var  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash tr  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;tr: line 1: var: command not found  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash -x tr  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;+ var =5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;tr: line 1: var: command not found  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;+ echo  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ vim tr  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash tr  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ bash -x tr  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;+ var=5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;+ echo 5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ zenity --info --text="hello world"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;zenity is used for user interfaces&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;ZENITY(1)                                                            ZENITY(1) &lt;/b&gt;&lt;/font&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;NAME  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       zenity - display GTK+ dialogs  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;SYNOPSIS  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       zenity [options]  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;DESCRIPTION  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       zenity  is a program that will display GTK+ dialogs, and return (either  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       in the return code, or on standard output) the users input. This allows  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       you to present information, and ask for information from the user, from  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       all manner of shell scripts.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       For example, zenity --question will return either 0 or 1, depending  on  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       whether  the  user  pressed OK or Cancel. zenity --entry will output on  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       standard output what the user typed into the text entry field.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Comprehensive documentation is available in  the  GNOME  Help  Browser,  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       under GNOME/Utilities.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;OPTIONS  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       This  program  follows  the  usual  GNU  command line syntax, with long  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       options starting with two dashes (‘-’).  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; Dialog options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --calendar  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display calendar dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --entry  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display text entry dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --error  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display error dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --file-selection  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display file selection dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --info Display info dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --list Display list dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --notification  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display notification icon  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --progress  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display progress indication dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; --question  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display question dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text-info &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display text information dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --warning  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display warning dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --scale  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display scale dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       General options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --title=TITLE  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog title  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --window-icon=ICONPATH  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the window icon  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --width=WIDTH  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog width  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --height=HEIGHT  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog height  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;Calendar options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --day=INT  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the calendar day  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --month=INT &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the calendar month  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --year=INT  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the calendar year  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --date-format=PATTERN  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the format for the returned date  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Text entry options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --entry-text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the entry text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; --hide-text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Hide the entry text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Error options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --no-wrap  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Do not enable text wrapping  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       File selection options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --filename=FILENAME  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the filename  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --multiple  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Allow selection of multiple filenames in file selection dialog  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --directory &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Activate directory-only selection  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --save Activate save mode  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --separator=SEPARATOR  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Specify separator character when returning multiple filenames  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;--confirm-overwrite &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Confirm file selection if filename already exists  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Info options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --no-wrap  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Do not enable text wrapping  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       List options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --column=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the column header  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --checklist &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Use check boxes for first column  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --radiolist &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Use radio buttons for first column  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --separator=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;                                         Set output separator character  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --multiple  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Allow multiple rows to be selected  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --editable  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Allow changes to text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --print-column=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Specify what column to print to standard output. The default  is  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              to  return  the  first  column.  ’ALL’  may be used to print all  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              columns.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --hide-column=NUMBER  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Hide a specific column  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Notification options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the notification text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --listen  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Listen for commands on stdin  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;Progress options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --percentage=INT  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set initial percentage  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --auto-close  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Close dialog when 100% has been reached  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --auto-kill &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Kill parent process if cancel button is pressed  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --pulsate  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Pulsate progress bar  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Question options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --no-wrap  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Do not enable text wrapping Text options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --filename=FILENAME  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Open file  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --editable  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Allow changes to text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Warning options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --no-wrap  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Do not enable text wrapping  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Scale options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --text=STRING  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set the dialog text  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --value=VALUE  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set initial value  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --min-value=VALUE  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set minimum value  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; --step=VALUE  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Set step size  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --print-partial  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Print partial values  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --hide-value  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Hide value  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Miscellaneous options  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       -?, --help  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Show summary of options.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --about  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Display an about dialog.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       --version  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;              Show version of program.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       Also the standard GTK+ options are accepted.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;USING AWK&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo "1 nav dd"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1 nav dd  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ echo "1 nav dd" | awk '{ print $2 }'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;nav  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1 asa f 22  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2 sds m 44  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3 ere f 55  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ vim fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk '{ if ($1 &gt;23) { print $2 } }' fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1 asa f 22  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2 sds m 44  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3 ere f 55  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4 saj m 22  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5 bos m 22  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk '{ if ($1 &gt;23) { print $2 } }' fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk '{ if ($4 &gt;23) { print $2 } }' fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;sds  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;ere  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk '{ if ($3 ==m) { print $2 } }' fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk '{ if ($3 == "m") { print $2 } }' fi  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;sds  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;saj  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;bos  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;FOR FINDING “A”ONLY&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk ' { print $2 } ' fi | awk '/^a/ { print $1 }'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;asa  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat file  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1 aparna f 21  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2 murad m 23  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3 unni m 21  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4 priya f 24  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5 fathima f 22&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk ' { print $1  $2}' file | awk ' /.a$/ { print $1  $2 }'1aparna  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4priya  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5fathima&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk ' { print $2  $1}' file | awk ' /^a/ { print $1  $2 }'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aparna1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk ' { print $2 }' file | awk ' /^a/ { print $1   }'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aparna&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;@catfoss4:~$ awk '{ if ($3=="m")  { print $3  $2}}' file  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;mmurad  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;munni&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk ' { print $2 }' file | awk ' /^a/ { print $1   }'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aparna  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk ' { print $1  $2}' file | awk ' /a[a-z]*a/ { print $1  $2 }'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1aparna  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5fathima  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;EXACTLY  1 A&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk '{ if ($3=="m")  { print $2 " " $3}}' file |awk '/a+/ { print $1}'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;murad  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;AT LEAST ONE M&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk ' { if ($3=="m")  print $1  $2     }' file | awk ' /m/ { print $1  $2 }'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2murad  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6mnemeshm  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk ' {if ($3 == "m")  { print $2" "$1 } }' file | awk ' /^[b-z]*a[b-z]* / { print $2" "$1 }'  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2 murad  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;AWK&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat &gt;cod  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;{  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;print $2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;}  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;^C  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat cod  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;{  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;print $2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;}  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk -f cod file  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;aparna  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;murad  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;unni  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;priya  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;fathima  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;maaanemeshm  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat cod  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;{  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;for (i=0;i&lt;10;i++)&gt; &lt;/p&gt;&lt;p style="margin-bottom: 0cm;"&gt;{  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;print i  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;}  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;}  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk -f cod file  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;7  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;9  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;7  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;9  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;7  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;9  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;7  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;9  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;7  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;9  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;3  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;4  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;6  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;7  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;9  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;BINARY TO HEX&lt;dec&gt; &lt;/dec&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0cm;"&gt;echo "enter the no"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;read n  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;dec=`echo "obase=10;ibase=2; " $n |bc`  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;hex=`echo "obase=16;ibase=2; " $n |bc`  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;oct=`echo "obase=8;ibase=2; "$n |bc`  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo "$n is $dec"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo "$n is $hex"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;echo "$n is $oct"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;USING AWK BINARY TO HEX CONVERSION&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;{&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;alpha="123456789ABCDEF"&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;binary=$1&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;base= $2&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;decimal=0&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;print "binary="$1", base="$2&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;inex=0&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;if (base != 2 )&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;{&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; while ( binary &gt;= 1 )&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; {&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  decmal=decmal+((binary % 10) * (2 ^ inex))&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  binary=int(binary/10)&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  inex=inex+1&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; }&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; if ( base == 10 )&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; {&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  print decmal "(base 10)"&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; }&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; else if ( base &lt;= 16 )&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; {&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  if ( decmal == 0 )&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  {&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;   print decmal&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  }&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  else&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  {&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;   fin=""&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;   while ( decmal &gt;= 1 )&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;   {&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;    print decmal&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;    print base&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;    fin=substr(alpha,decmal%base,1) fin&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;    x=decmal % base&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;    print "x"x&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;    decmal=int(decmal/base)&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;   }&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  print fin "(base"base")"&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  }&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; }&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; else  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; {&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  print "invalid base"&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; }&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;}&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;else&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;{&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;print binary&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;}&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;}&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;ANS:&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ awk -f  conn dfg  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;binary=1010, base=10  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;10(base 10)  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;binary=1011, base=8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;21  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;x5  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;8  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;x2  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;25(base8)  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;binary=1010, base=16  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;10  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;16  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;x10  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;A(base16)  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;binary=, base= 0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;catfoss@catfoss4:~$ cat /etc/fstab  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;# /etc/fstab: static file system information.  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;#  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;# &lt;file&gt; &lt;mount&gt;   &lt;type&gt;  &lt;options&gt;       &lt;dump&gt;  &lt;pass&gt;  &lt;/pass&gt;&lt;/dump&gt;&lt;/options&gt;&lt;/type&gt;&lt;/mount&gt;&lt;/file&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;proc            /proc           proc    defaults        0       0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;/dev/sda7       /               ext3    errors=remount-ro 0       1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;/dev/sda6       none            swap    sw              0       0  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;FOR MASH INSTALLATION&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;fist download the mash version from space-kerala.com,then extract the folder,right click the folder then extract&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;from the &lt;a href="mailto:catfoss@catfoss4cd"&gt;catfoss@catfoss4cd&lt;/a&gt; Desktop,cd mash&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;then type ./configure&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;then type make&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;then type cd bin  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;then ./maash&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;for adding extra to the file cmds.c type last portion of that our name like  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;pritntf  (stderr ,”\naveen  -Display my name .\n”); then save the file&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;font size="4"&gt;&lt;b&gt;palindrome&lt;/b&gt;&lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt; &lt;font style=""&gt;for ((k=1;k&lt;5;k++))&gt; &lt;/font&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               for ((l=5;l&gt;=k;l--))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;                       echo -n " "  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               for ((m=1;m&lt;=k;m++))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;                       echo -en "$m"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               for ((n=k-1;n&gt;0;n--))  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;                       echo -en "$n"  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;               done  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       echo " "  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;       &lt;font style=""&gt;done &lt;/font&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;ANS&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;    121  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;   12321  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;  1234321  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;while true  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; do  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; eject  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; sleep 1  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; eject -t  &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&gt; done  &lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-4517871229066493165?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/4517871229066493165/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/02/shell-terminal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/4517871229066493165'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/4517871229066493165'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/02/shell-terminal.html' title='shell terminal'/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-7099685305403941248</id><published>2010-02-02T22:23:00.000-08:00</published><updated>2010-04-29T23:36:13.666-07:00</updated><title type='text'>serveradmn</title><content type='html'>http://tldp.org/LDP/nag2/x-087-2-appl.remote.html&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. TCPDUMP DOWNLOAD:&lt;br /&gt;&lt;br /&gt;To download TCPdump:&lt;br /&gt;&lt;br /&gt;#apt-get install tcpdump&lt;br /&gt;To see the TCPdump dependencies:&lt;br /&gt;&lt;br /&gt;#apt-cache depends tcpdump&lt;br /&gt;tcpdump&lt;br /&gt;   Depends: libc6&lt;br /&gt;   Depends: libpcap0.8&lt;br /&gt;   Depends: libssl0.9.8&lt;br /&gt;&lt;br /&gt;To see the installed TCPdump version:&lt;br /&gt;&lt;br /&gt;#apt-cache policy tcpdump&lt;br /&gt;tcpdump:&lt;br /&gt;   Installed: 3.9.4-2ubuntu0.1&lt;br /&gt;   Candidate: 3.9.4-2ubuntu0.1&lt;br /&gt;   Version table:&lt;br /&gt;  *** 3.9.4-2ubuntu0.1 0&lt;br /&gt;            500 http://security.ubuntu.com dapper-security/main Packages&lt;br /&gt;            100 /var/lib/dpkg/status&lt;br /&gt;         3.9.4-2 0&lt;br /&gt;            500 http://ch.archive.ubuntu.com dapper/main Packages&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. TCPDUMP USE&lt;br /&gt;&lt;br /&gt;To display the Standard TCPdump output:&lt;br /&gt;&lt;br /&gt;#tcpdump&lt;br /&gt;tcpdump: verbose output suppressed, use -v or -vv for full protocol decode&lt;br /&gt;listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes&lt;br /&gt;&lt;br /&gt;21:57:29.004426 IP 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;21:57:31.228013 arp who-has 192.168.1.2 tell 192.168.1.1&lt;br /&gt;21:57:31.228020 arp reply 192.168.1.2 is-at 00:04:75:22:22:22 (oui Unknown)&lt;br /&gt;21:57:38.035382 IP 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;21:57:38.613206 IP valve-68-142-64-164.phx3.llnw.net.27014 &gt; 192.168.1.2.1034: UDP, length 36&lt;br /&gt;&lt;br /&gt;To display the verbose output:&lt;br /&gt;&lt;br /&gt;#tcpdump -v&lt;br /&gt;tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes&lt;br /&gt;&lt;br /&gt;22:00:11.625995 IP (tos 0x0, ttl 128, id 30917, offset 0, flags [none], proto: UDP (17), length: 81) 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;22:00:20.691903 IP (tos 0x0, ttl 128, id 31026, offset 0, flags [none], proto: UDP (17), length: 81) 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;22:00:21.230970 IP (tos 0x0, ttl 114, id 4373, offset 0, flags [none], proto: UDP (17), length: 64) valve-68-142-64-164.phx3.llnw.net.27014 &gt; 192.168.1.2.1034: UDP, length 36&lt;br /&gt;22:00:26.201715 arp who-has 192.168.1.2 tell 192.168.1.1&lt;br /&gt;22:00:26.201726 arp reply 192.168.1.2 is-at 00:04:11:11:11:11 (oui Unknown)&lt;br /&gt;22:00:29.706020 IP (tos 0x0, ttl 128, id 31133, offset 0, flags [none], proto: UDP (17), length: 81) 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;22:00:38.751355 IP (tos 0x0, ttl 128, id 31256, offset 0, flags [none], proto: UDP (17), length: 81) 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;&lt;br /&gt;Network interfaces available for the capture:&lt;br /&gt;&lt;br /&gt;#tcpdump -D&lt;br /&gt;1.eth0&lt;br /&gt;2.any (Pseudo-device that captures on all interfaces)&lt;br /&gt;3.lo&lt;br /&gt;&lt;br /&gt;To display numerical addresses rather than symbolic (DNS) addresses:&lt;br /&gt;&lt;br /&gt;#tcpdump -n&lt;br /&gt;tcpdump: verbose output suppressed, use -v or -vv for full protocol decode&lt;br /&gt;listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes&lt;br /&gt;&lt;br /&gt;22:02:36.111595 IP 192.168.1.2.1034 &gt; 68.142.64.164.27014: UDP, length 53&lt;br /&gt;22:02:36.669853 IP 68.142.64.164.27014 &gt; 192.168.1.2.1034: UDP, length 36&lt;br /&gt;22:02:41.702977 arp who-has 192.168.1.2 tell 192.168.1.1&lt;br /&gt;22:02:41.702984 arp reply 192.168.1.2 is-at 00:04:11:11:11:11&lt;br /&gt;22:02:45.106515 IP 192.168.1.2.1034 &gt; 68.142.64.164.27014: UDP, length 53&lt;br /&gt;22:02:50.392139 IP 192.168.1.2.138 &gt; 192.168.1.255.138: NBT UDP PACKET(138)&lt;br /&gt;22:02:54.139658 IP 192.168.1.2.1034 &gt; 68.142.64.164.27014: UDP, length 53&lt;br /&gt;22:02:57.866958 IP 125.175.131.58.3608 &gt; 192.168.1.2.9501: S 3275472679:3275472679(0) win 65535&lt;br /&gt;&lt;br /&gt;To display the quick output:&lt;br /&gt;&lt;br /&gt;#tcpdump -q&lt;br /&gt;tcpdump: verbose output suppressed, use -v or -vv for full protocol decode&lt;br /&gt;listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes&lt;br /&gt;&lt;br /&gt;22:03:55.594839 IP a213-22-130-46.cpe.netcabo.pt.3546 &gt; 192.168.1.2.9501: tcp 0&lt;br /&gt;22:03:55.698827 IP 192.168.1.2.9501 &gt; a213-22-130-46.cpe.netcabo.pt.3546: tcp 0&lt;br /&gt;22:03:56.068088 IP a213-22-130-46.cpe.netcabo.pt.3546 &gt; 192.168.1.2.9501: tcp 0&lt;br /&gt;22:03:56.068096 IP 192.168.1.2.9501 &gt; a213-22-130-46.cpe.netcabo.pt.3546: tcp 0&lt;br /&gt;22:03:57.362863 IP 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;22:03:57.964397 IP valve-68-142-64-164.phx3.llnw.net.27014 &gt; 192.168.1.2.1034: UDP, length 36&lt;br /&gt;22:04:06.406521 IP 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;22:04:15.393757 IP 192.168.1.2.1034 &gt; valve-68-142-64-164.phx3.llnw.net.27014: UDP, length 53&lt;br /&gt;&lt;br /&gt;Capture the traffic of a particular interface:&lt;br /&gt;&lt;br /&gt;tcpdump -i eth0&lt;br /&gt;To capture the UDP traffic:&lt;br /&gt;&lt;br /&gt;#tcpdump udp&lt;br /&gt;To capture the TCP port 80 traffic:&lt;br /&gt;&lt;br /&gt;#tcpdump port http&lt;br /&gt;To capture the traffic from a filter stored in a file:&lt;br /&gt;&lt;br /&gt;#tcpdump -F file_name&lt;br /&gt;To create a file where the filter is configured (here the TCP 80 port)&lt;br /&gt;&lt;br /&gt;#vim file_name&lt;br /&gt;port 80&lt;br /&gt;To stop the capture after 20 packets:&lt;br /&gt;&lt;br /&gt;#tcpdump -c 20&lt;br /&gt;To send the capture output in a file instead of directly on the screen:&lt;br /&gt;&lt;br /&gt;#tcpdump -w capture.log&lt;br /&gt;To read a capture file:&lt;br /&gt;&lt;br /&gt;#tcpdump -r capture.log&lt;br /&gt;reading from file capture.log, link-type EN10MB (Ethernet)&lt;br /&gt;&lt;br /&gt;09:33:51.977522 IP 192.168.1.36.40332 &gt; rr.knams.wikimedia.org.www: P 1548302662:1548303275(613) ack 148796145 win 16527&lt;br /&gt;09:33:52.031729 IP rr.knams.wikimedia.org.www &gt; 192.168.1.36.40332: . ack 613 win 86&lt;br /&gt;09:33:52.034414 IP rr.knams.wikimedia.org.www &gt; 192.168.1.36.40332: P 1:511(510) ack 613 win86&lt;br /&gt;09:33:52.034786 IP 192.168.1.36.40332 &gt; rr.knams.wikimedia.org.www: . ack 511 win 16527&lt;br /&gt;&lt;br /&gt;The captured data isn't stored in plain text so you cannot read it with a text editor, you have to use a special tool like TCPdump (see above) or Wireshark (Formerly Ethereal) which provides a graphical interface.&lt;br /&gt;&lt;br /&gt;The capture.log file is opened with Wireshark.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To display the packets having "www.openmaniak.com" as their source or destination address:&lt;br /&gt;&lt;br /&gt;#tcpdump host www.openmaniak.com&lt;br /&gt;To display the FTP packets coming from 192.168.1.100 to 192.168.1.2:&lt;br /&gt;&lt;br /&gt;#tcpdump src 192.168.1.100 and dst 192.168.1.2 and port ftp&lt;br /&gt;To display the packets content:&lt;br /&gt;&lt;br /&gt;#tcpdump -A&lt;br /&gt;Packets capture during a FTP connection. The FTP password can be easily intercepted because it is sent in clear text to the server.&lt;br /&gt;&lt;br /&gt;tcpdump: verbose output suppressed, use -v or -vv for full protocol decode&lt;br /&gt;listening on ath0, link-type EN10MB (Ethernet), capture size 96 bytes&lt;br /&gt;20:53:24.872785 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: S 4155598838:4155598838(0) win 5840&lt;br /&gt;....g....................&lt;br /&gt;............&lt;br /&gt;20:53:24.879473 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: . ack 1228937421 win 183&lt;br /&gt;....g.I@.............&lt;br /&gt;........&lt;br /&gt;20:53:24.881654 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: . ack 43 win 183&lt;br /&gt;....g.I@.......8.....&lt;br /&gt;......EN&lt;br /&gt;20:53:26.402046 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: P 0:10(10) ack 43 win 183&lt;br /&gt;....g.I@......`$.....&lt;br /&gt;...=..ENUSER teddybear&lt;br /&gt;&lt;br /&gt;20:53:26.403802 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: . ack 76 win 183&lt;br /&gt;....h.I@.............&lt;br /&gt;...&gt;..E^&lt;br /&gt;20:53:29.169036 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: P 10:25(15) ack 76 win 183&lt;br /&gt;....h.I@......#c.....&lt;br /&gt;......E^PASS wakeup&lt;br /&gt;&lt;br /&gt;20:53:29.171553 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: . ack 96 win 183&lt;br /&gt;....h.I@.,...........&lt;br /&gt;......Ez&lt;br /&gt;20:53:29.171649 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: P 25:31(6) ack 96 win 183&lt;br /&gt;....h.I@.,...........&lt;br /&gt;......EzSYST&lt;br /&gt;&lt;br /&gt;20:53:29.211607 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: . ack 115 win 183&lt;br /&gt;....h.I@.?.....j.....&lt;br /&gt;......Ez&lt;br /&gt;20:53:31.367619 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: P 31:37(6) ack 115 win 183&lt;br /&gt;....h.I@.?...........&lt;br /&gt;......EzQUIT&lt;br /&gt;&lt;br /&gt;20:53:31.369316 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: . ack 155 win 183&lt;br /&gt;....h.I@.g...........&lt;br /&gt;......E.&lt;br /&gt;20:53:31.369759 IP ubuntu.local.40205 &gt; 192.168.1.2.ftp: F 37:37(0) ack 156 win 183&lt;br /&gt;....h.I@.h.....e.....&lt;br /&gt;......E.&lt;br /&gt;&lt;br /&gt;We see in this capture the FTP username (teddybear) and password (wakeup).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;route add default\gw 192.168.150.1&lt;br /&gt;/etc/resolv.config  set name server for DNS address&lt;br /&gt;FIRST INSTALL IPCALC&lt;br /&gt;catfoss11:~# ipcalc 192.168.150.13&lt;br /&gt;Address:   192.168.150.13       11000000.10101000.10010110. 00001101&lt;br /&gt;Netmask:   255.255.255.0 = 24   11111111.11111111.11111111. 00000000&lt;br /&gt;Wildcard:  0.0.0.255            00000000.00000000.00000000. 11111111&lt;br /&gt;=&gt;&lt;br /&gt;Network:   192.168.150.0/24     11000000.10101000.10010110. 00000000&lt;br /&gt;HostMin:   192.168.150.1        11000000.10101000.10010110. 00000001&lt;br /&gt;HostMax:   192.168.150.254      11000000.10101000.10010110. 11111110&lt;br /&gt;Broadcast: 192.168.150.255      11000000.10101000.10010110. 11111111&lt;br /&gt;Hosts/Net: 254                   Class C, Private Internet&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;catfoss11:~# route&lt;br /&gt;Kernel IP routing table&lt;br /&gt;Destination     Gateway         Genmask         Flags Metric Ref    Use Iface&lt;br /&gt;192.168.150.0   *               255.255.255.0   U     0      0        0 eth0&lt;br /&gt;default         192.168.150.1   0.0.0.0         UG    0      0        0 eth0&lt;br /&gt;&lt;br /&gt;catfoss11:~# cat /etc/hostname&lt;br /&gt;catfoss11&lt;br /&gt;catfoss11:~# cat /etc/hosts&lt;br /&gt;127.0.0.1 localhost&lt;br /&gt;127.0.1.1 catfoss11&lt;br /&gt;&lt;br /&gt;# The following lines are desirable for IPv6 capable hosts&lt;br /&gt;::1 localhost ip6-localhost ip6-loopback&lt;br /&gt;fe00::0 ip6-localnet&lt;br /&gt;ff00::0 ip6-mcastprefix&lt;br /&gt;ff02::1 ip6-allnodes&lt;br /&gt;ff02::2 ip6-allrouters&lt;br /&gt;ff02::3 ip6-allhosts&lt;br /&gt;catfoss11:~# vim /etc/hosts(for setting the ip address with names)&lt;br /&gt;catfoss11:~# cat /proc/sys/net/ipv4/ip_forward&lt;br /&gt;0&lt;br /&gt;if it is set to 1,this make the s/m dump ruter(vim/proc/sys/net/ipv4/ip_forward )&lt;br /&gt;catfoss11:~# echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;catfoss11:~# cat /proc/sys/net/ipv4/ip_forward&lt;br /&gt;1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NAT :-it is known as network address translation&lt;br /&gt;&lt;br /&gt;pre routing---&gt;routing--------&gt;post routing&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE&lt;br /&gt;&lt;br /&gt;-A is used for append the nat.&lt;br /&gt;it places centers address to routers address&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -L&lt;br /&gt;Chain INPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination    &lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -t nat -L&lt;br /&gt;Chain PREROUTING (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain POSTROUTING (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;MASQUERADE  all  --  anywhere             anywhere           &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination       &lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -t  mangle -L&lt;br /&gt;Chain PREROUTING (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain INPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain POSTROUTING (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iptables[-t table] command[pattern] action&lt;br /&gt;there are 3 tables filter,nat,mangle&lt;br /&gt; for adding a rule iptables[-t table] command -A chain [rule]&lt;br /&gt;for deleting -D, iptables[-t table] command -D chain [rule] index&lt;br /&gt;Deleting an entire chain iptables -t nat -F chain&lt;br /&gt;&lt;br /&gt;for internet in the lan&lt;br /&gt;we need DNS IP&lt;br /&gt;is in same family then need a provider inthat we need an ip-forwording and masqurade&lt;br /&gt;&lt;br /&gt;action&lt;br /&gt;snat,masquride,DNAT,DEDIRECT&lt;br /&gt;source nat,destination&lt;br /&gt;&lt;br /&gt;iptables -t nat -A postrouting -p tcp -s 192.168.150.27&lt;br /&gt;&lt;br /&gt;-s for source&lt;br /&gt;-p for protocol&lt;br /&gt;-A for postrouting  packets coming from 192.168.150.27 after postrouting perform the action&lt;br /&gt;  packets going to 192.168.150.182 having the utp protocol after post routing&lt;br /&gt;iptables -t nat -A post routing -o etho -j masquride(if the packets are going through the etho at the time of post routing masquride&lt;br /&gt;&lt;br /&gt;ls *a* for finding starting files with a&lt;br /&gt;inthe noteless press ctrl +s&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;all pkts coming from 192.1               going through   eth0 do  action while free routimg&lt;br /&gt;iptables -t nat -A postrouting -o eth0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iptables -t nat -A postrouting -p!tcp -s!192.168.0.0/16&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iptables -t nat -A postrouting -ptcp -s192.168.150.2 --sport 12345:12356 -d 123.123.123.123--dport 22&lt;br /&gt;the packets coming from 192.168.150.2 is 12345 to 12356 port is goning to destination ip 123&lt;br /&gt;port no.of http is 80&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iptables -t nat cmnd pattern -j MASQUERADE: change center to out going  n/w interface&lt;br /&gt; -j masquerde used for changing the source port id&lt;br /&gt;iptables -t nat cmnd pattern-jSNAT --to-source 123.123.123.123&lt;br /&gt;                                                               change the address of the center to source 123.123.123.123&lt;br /&gt;              SNAT is static masquerede is dynamic&lt;br /&gt;              static is very fast&lt;br /&gt;iptables -t nat cmnd pattern -j DNAT --to-destination 123.123.123.123:22       change recipient addr. to 123.123.123.123 and port to 22&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DNAT is used for pre routing&lt;br /&gt;iptables -t nat cmnd pattern-j redirect --to-port 8080&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FOR CHANGING A BROWSER TO ANY S/M&lt;br /&gt;catfoss11:~# iptables -t nat -A OUTPUT -s 192.168.150.13 -j DNAT --to-destination 192.168.150.182&lt;br /&gt;for changing in the correct mode means in the above step we done the changes the browser to to the destination ip&lt;br /&gt;catfoss11:~# iptables -t nat -D OUTPUT -s 192.168.150.13 -j DNAT --to-destination 192.168.150.182&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -t nat -n -L&lt;br /&gt;catfoss11:~# iptables -t nat -F&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;catfoss11:~# telnet 192.168.150.13 80&lt;br /&gt;Trying 192.168.150.13...&lt;br /&gt;Connected to 192.168.150.13.&lt;br /&gt;Escape character is '^]'.&lt;br /&gt;GET / HTTP&lt;br /&gt;&lt;br /&gt;HTTP/1.1 200 OK&lt;br /&gt;Date: Wed, 13 Jan 2010 12:49:30 GMT&lt;br /&gt;Server: Apache/2.2.14 (Debian)&lt;br /&gt;Last-Modified: Wed, 13 Jan 2010 10:05:09 GMT&lt;br /&gt;ETag: "1df1c-183-47d08e7cc9f40"&lt;br /&gt;Accept-Ranges: bytes&lt;br /&gt;Content-Length: 387&lt;br /&gt;Vary: Accept-Encoding&lt;br /&gt;Connection: close&lt;br /&gt;Content-Type: text/html&lt;br /&gt;&lt;br /&gt;&lt;a &lt;html&gt;&lt;br /&gt;&lt;body&gt;&lt;h1&gt;WELCOME!&lt;/h1&gt;&lt;br /&gt;&lt;img src="avatar.png"&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="MEA engg. COLLEGE.jpg"&gt;mea engg.college&lt;/a&gt;&lt;br /&gt;&lt;p&gt;CATFOSS&lt;/p&gt;&lt;br /&gt;&lt;a href ="http://192.168.150.27"&gt;rakesh&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href ="http://192.168.150.12"&gt;vidya&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href ="http://192.168.150.26"&gt;linda&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href ="http://192.168.150.11"&gt;anu&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;a href ="http://192.168.150.180/wiki"&gt;wiki &lt;/a&gt;&lt;br /&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Connection closed by foreign host.&lt;br /&gt;for changing the&lt;br /&gt;catfoss11:~# iptables -t nat -A PREROUTING -p tcp --dport 6000 -j REDIRECT --to-ports 80&lt;br /&gt;catfoss11:~# iptables -t nat -A OUTPUT -p tcp --dport 6000 -j REDIRECT --to-ports 80&lt;br /&gt;catfoss11:~# netstat&lt;br /&gt;Active Internet connections (w/o servers)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;python&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; ord&lt;br /&gt;&gt;&gt;&gt; ord("a")&lt;br /&gt;97&lt;br /&gt;&gt;&gt;&gt; ord("n")&lt;br /&gt;110&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;server&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; import socket                                                        &lt;br /&gt;&lt;br /&gt;&lt;built-in function ord&gt;&lt;br /&gt;&gt;&gt;&gt; ord&lt;br /&gt;&lt;built-in function ord&gt;&lt;br /&gt;&gt;&gt;&gt; s=socket(AF_INET,SOCK_DGRAM)&lt;br /&gt;&gt;&gt;&gt; s.bind(("127.0.0.1",9000 ))&lt;br /&gt;&gt;&gt;&gt; while True:&lt;br /&gt;...     s.recvfrom (10)&lt;br /&gt;...&lt;br /&gt;('catfoss', ('127.0.0.1', 57420))&lt;br /&gt;&lt;br /&gt;('iam naveen', ('127.0.0.1', 57420))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;client&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&gt;&gt;&gt; from  socket import*&lt;br /&gt;&gt;&gt;&gt; c=socket (AF_INET,SOCK_DGRAM)&lt;br /&gt;&gt;&gt;&gt; c&lt;br /&gt;&lt;socket._socketobject object at 0xb7d984c4&gt;&lt;br /&gt;&gt;&gt;&gt; k="catfoss"&lt;br /&gt;&gt;&gt;&gt; c.sendto (k,("127.0.0.1",9000 ))&lt;br /&gt;7&lt;br /&gt;&gt;&gt;&gt; k="iam naveenbos"&lt;br /&gt;&gt;&gt;&gt; c.sendto (k,("127.0.0.1",9000 ))&lt;br /&gt;13&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -t nat -A PREROUTING -p UDP -s 192.168.150.27 --dport 6000 -j REDIRECT --to-ports 8000&lt;br /&gt;&lt;br /&gt;FIRE WALL&lt;br /&gt;&lt;br /&gt;drop: the packet will get but we can not take it&lt;br /&gt;rejaect means the packet willnot take&lt;br /&gt; shorewall&lt;br /&gt;Shoreline Firewall, netfilter configurator - common files&lt;br /&gt;Shorewall allows firewall/gateway requirements to be described using&lt;br /&gt;entries in a set of configuration files. It reads those configuration&lt;br /&gt;files and, with the help of the iptables utility, configures&lt;br /&gt;netfilter to match these requirements.&lt;br /&gt;&lt;br /&gt;Shorewall supports a wide range of router/firewall/gateway applications,&lt;br /&gt;traffic shaping and almost every type of VPN.&lt;br /&gt;&lt;br /&gt;This package contains files needed by both the Perl-based and&lt;br /&gt;shell-based compilers.&lt;br /&gt;&lt;br /&gt; filter:&lt;br /&gt;                  This  is  the default table (if no -t option is passed).  It&lt;br /&gt;                  contains the built-in chains INPUT (for packets destined  to&lt;br /&gt;                  local  sockets),  FORWARD  (for packets being routed through&lt;br /&gt;                  the box), and OUTPUT (for locally-generated packets).&lt;br /&gt;&lt;br /&gt;              nat:&lt;br /&gt;                  This table is consulted when a packet  that  creates  a  new&lt;br /&gt;                  connection  is encountered.  It consists of three built-ins:&lt;br /&gt;                  PREROUTING (for altering packets as soon as they  come  in),&lt;br /&gt;                  OUTPUT  (for altering locally-generated packets before rout‐&lt;br /&gt;                  ing), and POSTROUTING (for  altering  packets  as  they  are&lt;br /&gt;                  about to go out).&lt;br /&gt; mangle:&lt;br /&gt;                  This table is used for specialized packet alteration.  Until&lt;br /&gt;                  kernel 2.4.17 it had two built-in  chains:  PREROUTING  (for&lt;br /&gt;                  altering  incoming  packets  before routing) and OUTPUT (for&lt;br /&gt;                  altering locally-generated packets before  routing).   Since&lt;br /&gt;                  kernel  2.4.18,  three  other  built-in chains are also sup‐&lt;br /&gt;                  ported: INPUT (for packets coming into the box itself), FOR‐&lt;br /&gt;                  WARD  (for  altering  packets being routed through the box),&lt;br /&gt;                  and POSTROUTING (for altering packets as they are  about  to&lt;br /&gt;                  go out).&lt;br /&gt;raw:&lt;br /&gt;                  This  table  is  used mainly for configuring exemptions from&lt;br /&gt;                  connection tracking in combination with the NOTRACK  target.&lt;br /&gt;                  It registers at the netfilter hooks with higher priority and&lt;br /&gt;                  is thus called before ip_conntrack, or any other IP  tables.&lt;br /&gt;                  It  provides  the following built-in chains: PREROUTING (for&lt;br /&gt;                  packets arriving via  any  network  interface)  OUTPUT  (for&lt;br /&gt;                  packets generated by local processes)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ufw(uniqe fire wall)&lt;br /&gt;&lt;br /&gt;ufw status (enable or disable)&lt;br /&gt;ufw enable (for enabling the fire wall)&lt;br /&gt;iptables -X --delete chain&lt;br /&gt;gufw: graphical version means the editor(vim)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -N na&lt;br /&gt;catfoss11:~# iptables -L&lt;br /&gt;Chain INPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain na (0 references)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;catfoss11:~# vim b&lt;br /&gt;catfoss11:~# iptables-save&lt;br /&gt;# Generated by iptables-save v1.4.2 on Thu Jan 14 13:09:49 2010&lt;br /&gt;*filter&lt;br /&gt;:INPUT ACCEPT [301:56519]&lt;br /&gt;:FORWARD ACCEPT [0:0]&lt;br /&gt;:OUTPUT ACCEPT [9:523]&lt;br /&gt;:na - [0:0]&lt;br /&gt;COMMIT&lt;br /&gt;# Completed on Thu Jan 14 13:09:49 2010&lt;br /&gt;# Generated by iptables-save v1.4.2 on Thu Jan 14 13:09:49 2010&lt;br /&gt;*nat&lt;br /&gt;:PREROUTING ACCEPT [157:33864]&lt;br /&gt;:POSTROUTING ACCEPT [8:467]&lt;br /&gt;:OUTPUT ACCEPT [8:467]&lt;br /&gt;COMMIT&lt;br /&gt;# Completed on Thu Jan 14 13:09:49 2010&lt;br /&gt;catfoss11:~# iptables-save &gt;b&lt;br /&gt;catfoss11:~# vim b&lt;br /&gt;catfoss11:~# iptables -X&lt;br /&gt;catfoss11:~# iptables -L&lt;br /&gt;Chain INPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;catfoss11:~# iptables-restore a&lt;br /&gt;Can't open a: No such file or directory&lt;br /&gt;catfoss11:~# iptables-restore b&lt;br /&gt;catfoss11:~# iptables -L&lt;br /&gt;Chain INPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain na (0 references)&lt;br /&gt;target     prot opt source               destination  &lt;br /&gt;&lt;br /&gt;filter&lt;br /&gt;&lt;br /&gt;input ,(for go to firewall)&lt;br /&gt;output (signals from fire wall),&lt;br /&gt;forward(inside the firewall sym)filters packets protected from firewall&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT&lt;br /&gt;&lt;br /&gt;  -j ACCEPT ( is a rule)&lt;br /&gt;  -A INPUT (is achain)&lt;br /&gt;   state  :4 states&lt;br /&gt;   ctstate(conntrack)&lt;br /&gt;   1.NEW&lt;br /&gt;    2.RELATED (connection is new but is related to udp)&lt;br /&gt;    3.established    allredy established&lt;br /&gt;    4.invalid connection&lt;br /&gt;&lt;br /&gt;related established ---allow&lt;br /&gt;-m conntrack is a switch it is used for enabling the --ctstste,it allows filter matching  based on connection state of the packet&lt;br /&gt;&lt;br /&gt;for secure shell connection enabling&lt;br /&gt;catfoss11:~# iptables -A INPUT -p tcp --dport ssh -j ACCEPT&lt;br /&gt;&lt;br /&gt;ssh,telnet ,http had default ports&lt;br /&gt;enabling&lt;br /&gt;catfoss11:~# iptables -A INPUT -p tcp --dport 80  -j ACCEPT&lt;br /&gt;catfoss11:~# iptables -A INPUT -p tcp --dport www  -j ACCEPT&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -A INPUT  -j DROP&lt;br /&gt;Chain INPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;ACCEPT     all  --  anywhere             anywhere            ctstate RELATED,ESTABLISHED&lt;br /&gt;ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh&lt;br /&gt;ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www&lt;br /&gt;ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www&lt;br /&gt;DROP       all  --  anywhere             anywhere           &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination &lt;br /&gt;&lt;br /&gt;ACDEPT is highest priority than the DROP     &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -I INPUT 1 -i lo -j ACCEPT&lt;br /&gt;catfoss11:~# iptables -L&lt;br /&gt;Chain INPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;ACCEPT     all  --  anywhere             anywhere           &lt;br /&gt;ACCEPT     all  --  anywhere             anywhere            ctstate RELATED,ESTABLISHED&lt;br /&gt;ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh&lt;br /&gt;ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www&lt;br /&gt;ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www&lt;br /&gt;DROP       all  --  anywhere             anywhere           &lt;br /&gt;ACCEPT     all  --  anywhere             anywhere           &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT)&lt;br /&gt;target     prot opt source               destination        &lt;br /&gt;catfoss11:~# ping 127.0.0.1&lt;br /&gt;PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.&lt;br /&gt;64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.073 ms&lt;br /&gt;64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.066 ms&lt;br /&gt;64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.070 ms&lt;br /&gt;64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.069 ms&lt;br /&gt;64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.070 ms&lt;br /&gt;64 bytes from 127.0.0.1: icmp_seq=6 ttl=64 time=0.071 ms&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;catfoss11:~# iptables -L -v&lt;br /&gt;Chain INPUT (policy ACCEPT 341 packets, 67411 bytes)&lt;br /&gt; pkts bytes target     prot opt in     out     source               destination        &lt;br /&gt;   16  1340 ACCEPT     all  --  lo     any     anywhere             anywhere           &lt;br /&gt;   10   744 ACCEPT     all  --  any    any     anywhere             anywhere            ctstate RELATED,ESTABLISHED&lt;br /&gt;    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:ssh&lt;br /&gt;    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:www&lt;br /&gt;    0     0 ACCEPT     tcp  --  any    any     anywhere             anywhere            tcp dpt:www&lt;br /&gt;  139 27107 DROP       all  --  any    any     anywhere             anywhere           &lt;br /&gt;    0     0 ACCEPT     all  --  127.0.0.1 any     anywhere             anywhere           &lt;br /&gt;&lt;br /&gt;Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)&lt;br /&gt; pkts bytes target     prot opt in     out     source               destination        &lt;br /&gt;&lt;br /&gt;Chain OUTPUT (policy ACCEPT 104 packets, 8035 bytes)&lt;br /&gt; pkts bytes target     prot opt in     out     source               destination        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  -j&lt;br /&gt;accept&lt;br /&gt;reject(return packets to sender)&lt;br /&gt;drop&lt;br /&gt;log(store the inform.about packet)&lt;br /&gt;for accepting server is not possible because need server root pwd&lt;br /&gt;catfoss11:~# ssh 192.168.150.182&lt;br /&gt;The authenticity of host '192.168.150.182 (192.168.150.182)' can't be established.&lt;br /&gt;RSA key fingerprint is 0e:c8:8d:59:fd:45:f8:6b:15:39:ab:d3:75:c0:78:3a.&lt;br /&gt;Are you sure you want to continue connecting (yes/no)? yes&lt;br /&gt;Warning: Permanently added '192.168.150.182' (RSA) to the list of known hosts.&lt;br /&gt;root@192.168.150.182's password:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;catfoss11:/etc/network# cat interfaces&lt;br /&gt;# This file describes the network interfaces available on your system&lt;br /&gt;# and how to activate them. For more information, see interfaces(5).&lt;br /&gt;&lt;br /&gt;# The loopback network interface&lt;br /&gt;auto lo&lt;br /&gt;iface lo inet loopback&lt;br /&gt;&lt;br /&gt;iface eth0 inet static&lt;br /&gt;address 192.168.150.13&lt;br /&gt;netmask 255.255.255.0&lt;br /&gt;gateway 192.168.150.1&lt;br /&gt;&lt;br /&gt;auto eth0&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;chandni@catfoss11:~$ str="naveen"&lt;br /&gt;chandni@catfoss11:~$ zenity --info --text=$str&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;16/07/07&lt;br /&gt;I learned today how to block a website using iptables command. You just have to type the following&lt;br /&gt;&lt;br /&gt;iptables -I INPUT -s -d 0/0 -j DROP&lt;br /&gt;&lt;br /&gt;I blocked orkut by using&lt;br /&gt;&lt;br /&gt;iptables -I INPUT -s www.orkut.com -d 0/0 -j DROP&lt;br /&gt;&lt;br /&gt;It is recommended to use IP addresses instead of hostname. But I used hostname, so that my roommates have no difficulty in deleting the rule.&lt;br /&gt;&lt;br /&gt;To know all the possible IP addresses of a website, use&lt;br /&gt;&lt;br /&gt;host&lt;br /&gt;&lt;br /&gt;Most of the times it'll give more than one addresses, so you have to define a rule for every IP address using the same syntax and it is highly recommended to use IP addresses than the hostname.&lt;br /&gt;To delete the rule, the syntax is same. You have to only replace I with D&lt;br /&gt;&lt;br /&gt;iptables -D INPUT -s -d 0/0 -j DROP&lt;br /&gt;&lt;br /&gt;In my case I used&lt;br /&gt;&lt;br /&gt;iptables -D INPUT -s www.orkut.com -d 0/0 -j DROP&lt;br /&gt;&lt;br /&gt;I also edited my /etc/rc.d/rc.local file so that this rule will automatically load during boot time. I also edited one entry there. I deleted the line&lt;br /&gt;&lt;br /&gt;echo 1 &gt; /proc/sys/net/ipv4/ip_forward&lt;br /&gt;&lt;br /&gt;This line was for enabling my computer to forward the ip packets from other computer to internet using my computer as gateway. So instead of setting the value of ip_forward by echo command, I edited the Linux kernel config file: /etc/sysctl.conf&lt;br /&gt;and set the following value&lt;br /&gt;&lt;br /&gt;net.ipv4.ip_forward = 1&lt;br /&gt;&lt;br /&gt;I searched a lot for iptables. There were many useful sites. The one that helped me most is&lt;br /&gt;http://www.yolinux.com/TUTORIALS/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;or&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;iptables -A OUTPUT -d www.orkut.com  -j DROP&lt;br /&gt;catfoss:~# iptables  -A FORWARD -s orkut.com -o eth0 -j REJECT(in server)&lt;br /&gt;&lt;br /&gt;for using server from client&lt;br /&gt;&lt;br /&gt;catfoss11:~# ssh server@192.168.150.2&lt;br /&gt;server@192.168.150.2's password:&lt;br /&gt;Permission denied, please try again.&lt;br /&gt;server@192.168.150.2's password:&lt;br /&gt;Linux catfoss 2.6.26-2-xen-686 #1 SMP Sun Jun 21 09:15:17 UTC 2009 i686&lt;br /&gt;&lt;br /&gt;The programs included with the Debian GNU/Linux system are free software;&lt;br /&gt;the exact distribution terms for each program are described in the&lt;br /&gt;individual files in /usr/share/doc/*/copyright.&lt;br /&gt;&lt;br /&gt;Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent&lt;br /&gt;permitted by applicable law.&lt;br /&gt;You have mail.&lt;br /&gt;server@catfoss:~$ su -&lt;br /&gt;Password:&lt;br /&gt;catfoss:~# iptables -I INPUT -s www.orkut.com -j DROP&lt;br /&gt;catfoss:~# www-browser orkut.com&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-7099685305403941248?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/7099685305403941248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/02/serveradmn.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/7099685305403941248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/7099685305403941248'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/02/serveradmn.html' title='serveradmn'/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-469389243864754808</id><published>2010-02-02T22:22:00.000-08:00</published><updated>2010-04-29T23:36:13.671-07:00</updated><title type='text'>links</title><content type='html'>   	&lt;meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt; 	&lt;title&gt;&lt;/title&gt; 	&lt;meta name="GENERATOR" content="OpenOffice.org 2.4  (Linux)"&gt; 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		P { margin-bottom: 0.21cm } 	--&gt; 	&lt;/style&gt;  &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;Printer configuration &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;a href="http://www.linuxprinting.org/%7Etill/printing-tutorial/tut.html#1_1_1"&gt;http://www.linuxprinting.org/~till/printing-tutorial/tut.html#1_1_1&lt;/a&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;a href="http://forums.debian.net/viewtopic.php?t=10438"&gt;http://forums.debian.net/viewtopic.php?t=10438&lt;/a&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;xen&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;a href="http://wiki.debian.org/Xen#Installationonlenny"&gt;http://wiki.debian.org/Xen#Installationonlenny&lt;/a&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;xen-list-images(for testing images in the server) &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;xen-create-image &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;http://wiki.xensource.com/xenwiki/XenNetworking &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;catfoss11:~# less /etc/init.d/cups &lt;/b&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;a href="http://www.debianhelp.co.uk/dhcp.htm"&gt;http://www.debianhelp.co.uk/dhcp.htm&lt;/a&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;b&gt;&lt;a href="http://tldp.org/HOWTO/DHCP/index.html"&gt;http://tldp.org/HOWTO/DHCP/index.html&lt;/a&gt;&lt;/b&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-469389243864754808?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/469389243864754808/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/02/links.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/469389243864754808'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/469389243864754808'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/02/links.html' title='links'/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366258948420632812.post-697032227922296753</id><published>2010-02-02T22:20:00.000-08:00</published><updated>2010-04-29T23:36:13.676-07:00</updated><title type='text'>grep</title><content type='html'>   	&lt;meta http-equiv="CONTENT-TYPE" content="text/html; charset=utf-8"&gt; 	&lt;title&gt;&lt;/title&gt; 	&lt;meta name="GENERATOR" content="OpenOffice.org 2.4  (Linux)"&gt; 	&lt;style type="text/css"&gt; 	&lt;!-- 		@page { size: 21cm 29.7cm; margin: 2cm } 		TD P { margin-bottom: 0cm } 		P { margin-bottom: 0.21cm } 		H2 { margin-bottom: 0.21cm } 		H5 { margin-bottom: 0.21cm } 		H1 { margin-bottom: 0.21cm } 		H1.western { font-family: "Liberation Serif", serif } 		H1.cjk { font-family: "DejaVu Sans" } 		H1.ctl { font-family: "DejaVu Sans" } 	--&gt; 	&lt;/style&gt;  &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;table border="0" cellpadding="0" cellspacing="0" width="100%"&gt; 	&lt;col width="256"&gt; 	&lt;tbody&gt;&lt;tr&gt; 		&lt;td width="100%"&gt; 			&lt;p&gt;&lt;font color="#cc0000"&gt;&lt;font face="verdana"&gt;&lt;font size="4"&gt;&lt;b&gt;Linux 			/ Unix Command: &lt;i&gt;grep&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 		&lt;/td&gt; 	&lt;/tr&gt; 	&lt;tr&gt; 		&lt;td bgcolor="#cc0000" width="100%"&gt; 			&lt;p&gt;&lt;img src="http://z.about.com/" name="graphics1" align="bottom" border="0" width="2" height="2"&gt;&lt;/p&gt; 		&lt;/td&gt; 	&lt;/tr&gt; 	&lt;tr&gt; 		&lt;td width="100%"&gt; 			&lt;p&gt;&lt;img src="http://z.about.com/" name="graphics2" align="bottom" border="0" width="2" height="10"&gt; 			&lt;a href="http://linux.about.com/library/cmd/blcmdl.htm"&gt;&lt;font face="Verdana, Arial, Helvetica, sans-serif"&gt;&lt;font size="2"&gt;Command 			Library&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 		&lt;/td&gt; 	&lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;h2&gt;NAME&lt;/h2&gt; &lt;p&gt;&lt;a name="lbAC"&gt;&lt;/a&gt;grep, egrep, fgrep - print lines matching a pattern  &lt;/p&gt; &lt;h2&gt;SYNOPSIS&lt;/h2&gt; &lt;p&gt;&lt;a name="lbAD"&gt;&lt;/a&gt;&lt;b&gt;grep&lt;/b&gt; [&lt;i&gt;options&lt;/i&gt;] &lt;i&gt;PATTERN&lt;/i&gt; [&lt;i&gt;FILE&lt;/i&gt;...]&lt;br /&gt;&lt;b&gt;grep&lt;/b&gt; [&lt;i&gt;options&lt;/i&gt;] [&lt;b&gt;-e&lt;/b&gt; &lt;i&gt;PATTERN&lt;/i&gt; | &lt;b&gt;-f&lt;/b&gt; &lt;i&gt;FILE&lt;/i&gt;] [&lt;i&gt;FILE&lt;/i&gt;...]  &lt;/p&gt; &lt;h2&gt;DESCRIPTION&lt;/h2&gt; &lt;p&gt;&lt;b&gt;Grep&lt;/b&gt; searches the named input &lt;i&gt;FILE&lt;/i&gt;s (or standard input if no files are named, or the file name &lt;b&gt;-&lt;/b&gt; is given) for lines containing a match to the given &lt;i&gt;PATTERN&lt;/i&gt;. By default, &lt;b&gt;grep&lt;/b&gt; prints the matching lines.&lt;/p&gt; &lt;p&gt;&lt;a name="lbAE"&gt;&lt;/a&gt;In addition, two variant programs &lt;b&gt;egrep&lt;/b&gt; and &lt;b&gt;fgrep&lt;/b&gt; are available. &lt;b&gt;Egrep&lt;/b&gt; is the same as &lt;b&gt;grep -E&lt;/b&gt;. &lt;b&gt;Fgrep&lt;/b&gt; is the same as &lt;b&gt;grep -F&lt;/b&gt;.  &lt;/p&gt; &lt;h2&gt;OPTIONS&lt;/h2&gt; &lt;dl&gt;&lt;dt&gt;&lt;b&gt;-A&lt;/b&gt; &lt;i&gt;NUM&lt;/i&gt;, --after-context=&lt;i&gt;NUM&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Print &lt;i&gt;NUM&lt;/i&gt; lines of trailing context after matching lines. 	Places a line containing &lt;b&gt;--&lt;/b&gt; between contiguous groups of 	matches.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-a&lt;/b&gt;, &lt;b&gt;--text&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Process a binary file as if it were text; this is equivalent to the 	&lt;b&gt;--binary-files=text&lt;/b&gt; option.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-B&lt;/b&gt; &lt;i&gt;NUM&lt;/i&gt;, --before-context=&lt;i&gt;NUM&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Print &lt;i&gt;NUM&lt;/i&gt; lines of leading context before matching lines. 	Places a line containing &lt;b&gt;--&lt;/b&gt; between contiguous groups of 	matches.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-C&lt;/b&gt; &lt;i&gt;NUM&lt;/i&gt;, --context=&lt;i&gt;NUM&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Print &lt;i&gt;NUM&lt;/i&gt; lines of output context. Places a line containing 	&lt;b&gt;--&lt;/b&gt; between contiguous groups of matches.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-b&lt;/b&gt;, &lt;b&gt;--byte-offset&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Print the byte offset within the input file before each line of 	output.&lt;/dd&gt;&lt;/dl&gt; &lt;div id="wide" dir="ltr"&gt; 	&lt;dl&gt;&lt;dd&gt;zSB(3,3)&lt;/dd&gt;&lt;/dl&gt; 	&lt;div id="gB3" dir="ltr"&gt; 		&lt;h5 style="margin-left: 1cm;"&gt;&lt;a href="javascript:zpu(512,uy+'/z/ad/wasl.htm',450,425,'wao',100,100)"&gt;Sponsored 		Links&lt;/a&gt;&lt;/h5&gt; 		&lt;dl&gt;&lt;dd style="margin-bottom: 0.5cm;"&gt;&lt;a href="http://googleads.g.doubleclick.net/aclk?sa=l&amp;amp;ai=BxQrFi84pS_fFCpDSvgPnx8TMDZvOhaAB4_3Oyw_AjbcB0IjtFBABGAEgqKX3ASgJOABQ5Lm60wdg5Yrmg7gOsgEPbGludXguYWJvdXQuY29tyAEB2gE1aHR0cDovL2xpbnV4LmFib3V0LmNvbS9vZC9jb21tYW5kcy9sL2JsY21kbDFfZ3JlcC5odG2pAsA6lqTbCFc-yALt4OkMqAMBuAMB6AMf6APgBfUDAAQABPUDAAAAEA&amp;amp;num=1&amp;amp;sig=AGiWqtzNpkFiXF-Z1HaSXRPHz2x1cGPmMg&amp;amp;client=ca-primedia-premium_js&amp;amp;adurl=http://www-07.ibm.com/systems/in/itsolutions/virtualisation/index.html%3Fca%3Dgoogleaw_247setup" target="_blank"&gt;Linux 			VirtualizationOptimize Your IT Infrastructure w/ IBM Solutions. 			Get IBM Offers Now.IBM.com/Virtualization-Solutions&lt;/a&gt;&lt;/dd&gt;&lt;dd style="margin-bottom: 0.5cm;"&gt; 			&lt;a href="http://googleads.g.doubleclick.net/aclk?sa=l&amp;amp;ai=B0O8ji84pS_fFCpDSvgPnx8TMDcSxgSHGwMWxCcCNtwGgpCgQAhgCIKil9wEoCTgAUNiF-cT9_____wFg5Yrmg7gOsgEPbGludXguYWJvdXQuY29tyAEB2gE1aHR0cDovL2xpbnV4LmFib3V0LmNvbS9vZC9jb21tYW5kcy9sL2JsY21kbDFfZ3JlcC5odG2oAwG4AwHoAx_oA-AF9QMABAAE9QMAAAAQ&amp;amp;num=2&amp;amp;sig=AGiWqtyi7c0frYsSqSEBiT24F_uCHlKfNg&amp;amp;client=ca-primedia-premium_js&amp;amp;adurl=http://www.EmperorLinux.com/dell" target="_blank"&gt;Professional 			Linux LaptopLinux on M6400, E6500, E6400, E4200 Fedora, Ubuntu, 			RHEL, Debian, Slackwww.EmperorLinux.com&lt;/a&gt;&lt;/dd&gt;&lt;dd style="margin-bottom: 0.5cm;"&gt; 			&lt;a href="http://googleads.g.doubleclick.net/aclk?sa=l&amp;amp;ai=B45_Vi84pS_fFCpDSvgPnx8TMDcvb6qQBrbDMlBHAjbcB8IQOEAMYAyCopfcBKAk4AFDB8IKpBmDliuaDuA6yAQ9saW51eC5hYm91dC5jb23IAQHaATVodHRwOi8vbGludXguYWJvdXQuY29tL29kL2NvbW1hbmRzL2wvYmxjbWRsMV9ncmVwLmh0bcgC-67IDagDAbgDAegDH-gD4AX1AwAEAAT1AwAAABA&amp;amp;num=3&amp;amp;sig=AGiWqtzduNNBcHlm-K9ZQepNJRIHJ6XrRA&amp;amp;client=ca-primedia-premium_js&amp;amp;adurl=http://www.moblinzone.ddj.com/%3Fkw%3Dsem_ddj_soft_goog_Moblin_Moblin_adver2_moblin%2520linux" target="_blank"&gt;Moblin 			LinuxGet everything you need to develop apps with Moblin. Go 			now!moblinzone.ddj.com&lt;/a&gt;&lt;/dd&gt;&lt;/dl&gt; 	&lt;/div&gt; &lt;/div&gt; &lt;dl&gt;&lt;dt&gt;&lt;b&gt;--binary-files=&lt;/b&gt;&lt;i&gt;TYPE&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	If the first few bytes of a file indicate that the file contains 	binary data, assume that the file is of type &lt;i&gt;TYPE&lt;/i&gt;. By 	default, &lt;i&gt;TYPE&lt;/i&gt; is &lt;b&gt;binary&lt;/b&gt;, and &lt;b&gt;grep&lt;/b&gt; normally 	outputs either a one-line message saying that a binary file matches, 	or no message if there is no match. If &lt;i&gt;TYPE&lt;/i&gt; is &lt;b&gt;without-match&lt;/b&gt;, 	&lt;b&gt;grep&lt;/b&gt; assumes that a binary file does not match; this is 	equivalent to the &lt;b&gt;-I&lt;/b&gt; option. If &lt;i&gt;TYPE&lt;/i&gt; is &lt;b&gt;text&lt;/b&gt;, 	&lt;b&gt;grep&lt;/b&gt; processes a binary file as if it were text; this is 	equivalent to the &lt;b&gt;-a&lt;/b&gt; option. &lt;i&gt;Warning:&lt;/i&gt; &lt;b&gt;grep 	--binary-files=text&lt;/b&gt; might output binary garbage, which can have 	nasty side effects if the output is a terminal and if the terminal 	driver interprets some of it as commands.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;--colour[=&lt;/b&gt;&lt;i&gt;WHEN&lt;/i&gt;]&lt;i&gt;,&lt;/i&gt; &lt;b&gt;--color[=&lt;/b&gt;&lt;i&gt;WHEN&lt;/i&gt;]  	&lt;/dt&gt;&lt;dd&gt; 	Surround the matching string with the marker find in &lt;b&gt;GREP_COLOR&lt;/b&gt; 	environment variable. WHEN may be `never', `always', or `auto'  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-c&lt;/b&gt;, &lt;b&gt;--count&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Suppress normal output; instead print a count of matching lines for 	each input file. With the &lt;b&gt;-v&lt;/b&gt;, &lt;b&gt;--invert-match&lt;/b&gt; option 	(see below), count non-matching lines.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-D&lt;/b&gt; &lt;i&gt;ACTION&lt;/i&gt;, --devices=&lt;i&gt;ACTION&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	If an input file is a device, FIFO or socket, use &lt;i&gt;ACTION&lt;/i&gt; to 	process it. By default, &lt;i&gt;ACTION&lt;/i&gt; is &lt;b&gt;read&lt;/b&gt;, which means 	that devices are read just as if they were ordinary files. If &lt;i&gt;ACTION&lt;/i&gt; 	is &lt;b&gt;skip&lt;/b&gt;, devices are silently skipped.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-d&lt;/b&gt; &lt;i&gt;ACTION&lt;/i&gt;, --directories=&lt;i&gt;ACTION&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	If an input file is a directory, use &lt;i&gt;ACTION&lt;/i&gt; to process it. By 	default, &lt;i&gt;ACTION&lt;/i&gt; is &lt;b&gt;read&lt;/b&gt;, which means that directories 	are read just as if they were ordinary files. If &lt;i&gt;ACTION&lt;/i&gt; is 	&lt;b&gt;skip&lt;/b&gt;, directories are silently skipped. If &lt;i&gt;ACTION&lt;/i&gt; is 	&lt;b&gt;recurse&lt;/b&gt;, &lt;b&gt;grep&lt;/b&gt; reads all files under each directory, 	recursively; this is equivalent to the &lt;b&gt;-r&lt;/b&gt; option.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-E&lt;/b&gt;, &lt;b&gt;--extended-regexp&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Interpret &lt;i&gt;PATTERN&lt;/i&gt; as an extended regular expression (see 	below).  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-e&lt;/b&gt; &lt;i&gt;PATTERN&lt;/i&gt;, --regexp=&lt;i&gt;PATTERN&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Use &lt;i&gt;PATTERN&lt;/i&gt; as the pattern; useful to protect patterns 	beginning with &lt;b&gt;-&lt;/b&gt;.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-F&lt;/b&gt;, &lt;b&gt;--fixed-strings&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Interpret &lt;i&gt;PATTERN&lt;/i&gt; as a list of fixed strings, separated by 	newlines, any of which is to be matched. &lt;b&gt;-P&lt;/b&gt;, &lt;b&gt;--perl-regexp&lt;/b&gt; 	Interpret &lt;i&gt;PATTERN&lt;/i&gt; as a Perl regular expression.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-f&lt;/b&gt; &lt;i&gt;FILE&lt;/i&gt;, --file=&lt;i&gt;FILE&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Obtain patterns from &lt;i&gt;FILE&lt;/i&gt;, one per line. The empty file 	contains zero patterns, and therefore matches nothing.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-G&lt;/b&gt;, &lt;b&gt;--basic-regexp&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Interpret &lt;i&gt;PATTERN&lt;/i&gt; as a basic regular expression (see below). 	This is the default.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-H&lt;/b&gt;, &lt;b&gt;--with-filename&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Print the filename for each match.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-h&lt;/b&gt;, &lt;b&gt;--no-filename&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Suppress the prefixing of filenames on output when multiple files 	are searched.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;--help&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Output a brief help message.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-I&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Process a binary file as if it did not contain matching data; this 	is equivalent to the &lt;b&gt;--binary-files=without-match&lt;/b&gt; option.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-i&lt;/b&gt;, &lt;b&gt;--ignore-case&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Ignore case distinctions in both the &lt;i&gt;PATTERN&lt;/i&gt; and the input 	files.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-L&lt;/b&gt;, &lt;b&gt;--files-without-match&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Suppress normal output; instead print the name of each input file 	from which no output would normally have been printed. The scanning 	will stop on the first match.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-l&lt;/b&gt;, &lt;b&gt;--files-with-matches&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Suppress normal output; instead print the name of each input file 	from which output would normally have been printed. The scanning 	will stop on the first match.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-m&lt;/b&gt; &lt;i&gt;NUM&lt;/i&gt;, --max-count=&lt;i&gt;NUM&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Stop reading a file after &lt;i&gt;NUM&lt;/i&gt; matching lines. If the input is 	standard input from a regular file, and &lt;i&gt;NUM&lt;/i&gt; matching lines 	are output, &lt;b&gt;grep&lt;/b&gt; ensures that the standard input is 	positioned to just after the last matching line before exiting, 	regardless of the presence of trailing context lines. This enables a 	calling process to resume a search. When &lt;b&gt;grep&lt;/b&gt; stops after &lt;i&gt;NUM&lt;/i&gt; 	matching lines, it outputs any trailing context lines. When the &lt;b&gt;-c&lt;/b&gt; 	or &lt;b&gt;--count&lt;/b&gt; option is also used, &lt;b&gt;grep&lt;/b&gt; does not output a 	count greater than &lt;i&gt;NUM&lt;/i&gt;. When the &lt;b&gt;-v&lt;/b&gt; or &lt;b&gt;--invert-match&lt;/b&gt; 	option is also used, &lt;b&gt;grep&lt;/b&gt; stops after outputting &lt;i&gt;NUM&lt;/i&gt; 	non-matching lines.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;--mmap&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	If possible, use the &lt;a href="http://linux.about.com/library/cmd/blcmdl2_mmap.htm"&gt;&lt;b&gt;mmap&lt;/b&gt;&lt;/a&gt;(2) 	system call to read input, instead of the default &lt;a href="http://linux.about.com/library/cmd/blcmdl2_read.htm"&gt;&lt;b&gt;read&lt;/b&gt;&lt;/a&gt;(2) 	system call. In some situations, &lt;b&gt;--mmap&lt;/b&gt; yields better 	performance. However, &lt;b&gt;--mmap&lt;/b&gt; can cause undefined behavior 	(including core dumps) if an input file shrinks while &lt;b&gt;grep&lt;/b&gt; is 	operating, or if an I/O error occurs.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-n&lt;/b&gt;, &lt;b&gt;--line-number&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Prefix each line of output with the line number within its input 	file.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-o&lt;/b&gt;, &lt;b&gt;--only-matching&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Show only the part of a matching line that matches &lt;i&gt;PATTERN.&lt;/i&gt;  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;--label=&lt;/b&gt;&lt;i&gt;LABEL&lt;/i&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Displays input actually coming from standard input as input coming 	from file &lt;i&gt;LABEL.&lt;/i&gt; This is especially useful for tools like 	zgrep, e.g. &lt;b&gt;gzip -cd foo.gz |grep --label=foo something&lt;/b&gt;  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;--line-buffering&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Use line buffering, it can be a performance penality.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-q&lt;/b&gt;, &lt;b&gt;--quiet&lt;/b&gt;, &lt;b&gt;--silent&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Quiet; do not write anything to standard output. Exit immediately 	with zero status if any match is found, even if an error was 	detected. Also see the &lt;b&gt;-s&lt;/b&gt; or &lt;b&gt;--no-messages&lt;/b&gt; option.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-R&lt;/b&gt;, &lt;b&gt;-r&lt;/b&gt;, &lt;b&gt;--recursive&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Read all files under each directory, recursively; this is equivalent 	to the &lt;b&gt;-d recurse&lt;/b&gt; option.  	&lt;/dd&gt;&lt;dt&gt; 	--include=PATTERN  	&lt;/dt&gt;&lt;dd&gt; 	Recurse in directories only searching file matching &lt;i&gt;PATTERN.&lt;/i&gt;  	&lt;/dd&gt;&lt;dt&gt; 	--exclude=PATTERN  	&lt;/dt&gt;&lt;dd&gt; 	Recurse in directories skip file matching &lt;i&gt;PATTERN.&lt;/i&gt;  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-s&lt;/b&gt;, &lt;b&gt;--no-messages&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Suppress error messages about nonexistent or unreadable files. 	Portability note: unlike &lt;font size="2"&gt;GNU&lt;/font&gt; &lt;b&gt;grep&lt;/b&gt;, 	traditional &lt;b&gt;grep&lt;/b&gt; did not conform to &lt;font size="2"&gt;POSIX.2&lt;/font&gt;, 	because traditional &lt;b&gt;grep&lt;/b&gt; lacked a &lt;b&gt;-q&lt;/b&gt; option and its &lt;b&gt;-s&lt;/b&gt; 	option behaved like &lt;font size="2"&gt;GNU&lt;/font&gt; &lt;b&gt;grep&lt;/b&gt;'s &lt;b&gt;-q&lt;/b&gt; 	option. Shell scripts intended to be portable to traditional &lt;b&gt;grep&lt;/b&gt; 	should avoid both &lt;b&gt;-q&lt;/b&gt; and &lt;b&gt;-s&lt;/b&gt; and should redirect output 	to /dev/null instead.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-U&lt;/b&gt;, &lt;b&gt;--binary&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Treat the file(s) as binary. By default, under MS-DOS and 	MS-Windows, &lt;b&gt;grep&lt;/b&gt; guesses the file type by looking at the 	contents of the first 32KB read from the file. If &lt;b&gt;grep&lt;/b&gt; 	decides the file is a text file, it strips the CR characters from 	the original file contents (to make regular expressions with &lt;b&gt;^&lt;/b&gt; 	and &lt;b&gt;$&lt;/b&gt; work correctly). Specifying &lt;b&gt;-U&lt;/b&gt; overrules this 	guesswork, causing all files to be read and passed to the matching 	mechanism verbatim; if the file is a text file with CR/LF pairs at 	the end of each line, this will cause some regular expressions to 	fail. This option has no effect on platforms other than MS-DOS and 	MS-Windows.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-u&lt;/b&gt;, &lt;b&gt;--unix-byte-offsets&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Report Unix-style byte offsets. This switch causes &lt;b&gt;grep&lt;/b&gt; to 	report byte offsets as if the file were Unix-style text file, i.e. 	with CR characters stripped off. This will produce results identical 	to running &lt;b&gt;grep&lt;/b&gt; on a Unix machine. This option has no effect 	unless &lt;b&gt;-b&lt;/b&gt; option is also used; it has no effect on platforms 	other than MS-DOS and MS-Windows.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-V&lt;/b&gt;, &lt;b&gt;--version&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Print the version number of &lt;b&gt;grep&lt;/b&gt; to standard error. This 	version number should be included in all bug reports (see below).  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-v&lt;/b&gt;, &lt;b&gt;--invert-match&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Invert the sense of matching, to select non-matching lines.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-w&lt;/b&gt;, &lt;b&gt;--word-regexp&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Select only those lines containing matches that form whole words. 	The test is that the matching substring must either be at the 	beginning of the line, or preceded by a non-word constituent 	character. Similarly, it must be either at the end of the line or 	followed by a non-word constituent character. Word-constituent 	characters are letters, digits, and the underscore.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-x&lt;/b&gt;, &lt;b&gt;--line-regexp&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Select only those matches that exactly match the whole line.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-y&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	Obsolete synonym for &lt;b&gt;-i&lt;/b&gt;.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;-Z&lt;/b&gt;, &lt;b&gt;--null&lt;/b&gt;  	&lt;/dt&gt;&lt;dd style="margin-bottom: 0.5cm;"&gt; 	Output a zero byte (the &lt;font size="2"&gt;ASCII&lt;/font&gt; &lt;b&gt;NUL&lt;/b&gt; 	character) instead of the character that normally follows a file 	name. For example, &lt;b&gt;grep -lZ&lt;/b&gt; outputs a zero byte after each 	file name instead of the usual newline. This option makes the output 	unambiguous, even in the presence of file names containing unusual 	characters like newlines. This option can be used with commands like 	&lt;b&gt;find -print0&lt;/b&gt;, &lt;b&gt;perl -0&lt;/b&gt;, &lt;b&gt;sort -z&lt;/b&gt;, and &lt;b&gt;xargs -0&lt;/b&gt; 	to process arbitrary file names, even those that contain newline 	characters.  	&lt;/dd&gt;&lt;/dl&gt; &lt;h2&gt; &lt;a name="lbAF"&gt;&lt;/a&gt;REGULAR EXPRESSIONS&lt;/h2&gt; &lt;p&gt;A regular expression is a pattern that describes a set of strings. Regular expressions are constructed analogously to arithmetic expressions, by using various operators to combine smaller expressions.&lt;/p&gt; &lt;p&gt;&lt;b&gt;Grep&lt;/b&gt; understands two different versions of regular expression syntax: ``basic'' and ``extended.'' In &lt;font size="2"&gt;GNU&lt;/font&gt; &lt;b&gt;grep&lt;/b&gt;, there is no difference in available functionality using either syntax. In other implementations, basic regular expressions are less powerful. The following description applies to extended regular expressions; differences for basic regular expressions are summarized afterwards.&lt;/p&gt; &lt;p&gt;The fundamental building blocks are the regular expressions that match a single character. Most characters, including all letters and digits, are regular expressions that match themselves. Any metacharacter with special meaning may be quoted by preceding it with a backslash.&lt;/p&gt; &lt;p&gt;A &lt;i&gt;bracket expression&lt;/i&gt; is a list of characters enclosed by &lt;b&gt;[&lt;/b&gt; and &lt;b&gt;]&lt;/b&gt;. It matches any single character in that list; if the first character of the list is the caret &lt;b&gt;^&lt;/b&gt; then it matches any character &lt;i&gt;not&lt;/i&gt; in the list. For example, the regular expression &lt;b&gt;[0123456789]&lt;/b&gt; matches any single digit.&lt;/p&gt; &lt;p&gt;Within a bracket expression, a &lt;i&gt;range expression&lt;/i&gt; consists of two characters separated by a hyphen. It matches any single character that sorts between the two characters, inclusive, using the locale's collating sequence and character set. For example, in the default C locale, &lt;b&gt;[a-d]&lt;/b&gt; is equivalent to &lt;b&gt;[abcd]&lt;/b&gt;. Many locales sort characters in dictionary order, and in these locales &lt;b&gt;[a-d]&lt;/b&gt; is typically not equivalent to &lt;b&gt;[abcd]&lt;/b&gt;; it might be equivalent to &lt;b&gt;[aBbCcDd]&lt;/b&gt;, for example. To obtain the traditional interpretation of bracket expressions, you can use the C locale by setting the &lt;b&gt;LC_ALL&lt;/b&gt; environment variable to the value &lt;b&gt;C&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;Finally, certain named classes of characters are predefined within bracket expressions, as follows. Their names are self explanatory, and they are &lt;b&gt;[:alnum:]&lt;/b&gt;, &lt;b&gt;[:alpha:]&lt;/b&gt;, &lt;b&gt;[:cntrl:]&lt;/b&gt;, &lt;b&gt;[:digit:]&lt;/b&gt;, &lt;b&gt;[:graph:]&lt;/b&gt;, &lt;b&gt;[:lower:]&lt;/b&gt;, &lt;b&gt;[:print:]&lt;/b&gt;, &lt;b&gt;[:punct:]&lt;/b&gt;, &lt;b&gt;[:space:]&lt;/b&gt;, &lt;b&gt;[:upper:]&lt;/b&gt;, and &lt;b&gt;[:xdigit:].&lt;/b&gt; For example, &lt;b&gt;[[:alnum:]]&lt;/b&gt; means &lt;b&gt;[0-9A-Za-z]&lt;/b&gt;, except the latter form depends upon the C locale and the &lt;font size="2"&gt;ASCII&lt;/font&gt; character encoding, whereas the former is independent of locale and character set. (Note that the brackets in these class names are part of the symbolic names, and must be included in addition to the brackets delimiting the bracket list.) Most metacharacters lose their special meaning inside lists. To include a literal &lt;b&gt;]&lt;/b&gt; place it first in the list. Similarly, to include a literal &lt;b&gt;^&lt;/b&gt; place it anywhere but first. Finally, to include a literal &lt;b&gt;-&lt;/b&gt; place it last.&lt;/p&gt; &lt;p&gt;The period &lt;b&gt;.&lt;/b&gt; matches any single character. The symbol &lt;b&gt;\w&lt;/b&gt; is a synonym for &lt;b&gt;[[:alnum:]]&lt;/b&gt; and &lt;b&gt;\W&lt;/b&gt; is a synonym for &lt;b&gt;[^[:alnum]]&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;The caret &lt;b&gt;^&lt;/b&gt; and the dollar sign &lt;b&gt;$&lt;/b&gt; are metacharacters that respectively match the empty string at the beginning and end of a line. The symbols &lt;b&gt;\&lt;&lt;/B&gt; and \&gt; respectively match the empty string at the beginning and end of a word. The symbol \b matches the empty string at the edge of a word, and \B matches the empty string provided it's &lt;/b&gt;&lt;i&gt;&lt;b&gt;not&lt;/b&gt;&lt;/i&gt;&lt;b&gt; at the edge of a word.&lt;/b&gt;&lt;/p&gt; &lt;p&gt;A regular expression may be followed by one of several repetition operators:&lt;/p&gt; &lt;dl&gt;&lt;dt&gt;&lt;b&gt;?&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	The preceding item is optional and matched at most once.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;*&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	The preceding item will be matched zero or more times.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;+&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	The preceding item will be matched one or more times.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;{&lt;/b&gt;&lt;i&gt;n&lt;/i&gt;&lt;b&gt;}&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	The preceding item is matched exactly &lt;i&gt;n&lt;/i&gt; times.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;{&lt;/b&gt;&lt;i&gt;n&lt;/i&gt;&lt;b&gt;,}&lt;/b&gt;  	&lt;/dt&gt;&lt;dd&gt; 	The preceding item is matched &lt;i&gt;n&lt;/i&gt; or more times.  	&lt;/dd&gt;&lt;dt&gt; 	&lt;b&gt;{&lt;/b&gt;&lt;i&gt;n&lt;/i&gt;&lt;b&gt;,&lt;/b&gt;&lt;i&gt;m&lt;/i&gt;&lt;b&gt;}&lt;/b&gt;  	&lt;/dt&gt;&lt;dd style="margin-bottom: 0.5cm;"&gt; 	The preceding item is matched at least &lt;i&gt;n&lt;/i&gt; times, but not more 	than &lt;i&gt;m&lt;/i&gt; times.  	&lt;/dd&gt;&lt;/dl&gt; &lt;p&gt; Two regular expressions may be concatenated; the resulting regular expression matches any string formed by concatenating two substrings that respectively match the concatenated subexpressions.&lt;/p&gt; &lt;p&gt;Two regular expressions may be joined by the infix operator &lt;b&gt;|&lt;/b&gt;; the resulting regular expression matches any string matching either subexpression.&lt;/p&gt; &lt;p&gt;Repetition takes precedence over concatenation, which in turn takes precedence over alternation. A whole subexpression may be enclosed in parentheses to override these precedence rules.&lt;/p&gt; &lt;p&gt;The backreference &lt;b&gt;\&lt;/b&gt;&lt;i&gt;n&lt;/i&gt;, where &lt;i&gt;n&lt;/i&gt; is a single digit, matches the substring previously matched by the &lt;i&gt;n&lt;/i&gt;th parenthesized subexpression of the regular expression.&lt;/p&gt; &lt;p&gt;In basic regular expressions the metacharacters &lt;b&gt;?&lt;/b&gt;, &lt;b&gt;+&lt;/b&gt;, &lt;b&gt;{&lt;/b&gt;, &lt;b&gt;|&lt;/b&gt;, &lt;b&gt;(&lt;/b&gt;, and &lt;b&gt;)&lt;/b&gt; lose their special meaning; instead use the backslashed versions &lt;b&gt;\?&lt;/b&gt;, &lt;b&gt;\+&lt;/b&gt;, &lt;b&gt;\{&lt;/b&gt;, &lt;b&gt;\|&lt;/b&gt;, &lt;b&gt;\(&lt;/b&gt;, and &lt;b&gt;\)&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;Traditional &lt;b&gt;egrep&lt;/b&gt; did not support the &lt;b&gt;{&lt;/b&gt; metacharacter, and some &lt;b&gt;egrep&lt;/b&gt; implementations support &lt;b&gt;\{&lt;/b&gt; instead, so portable scripts should avoid &lt;b&gt;{&lt;/b&gt; in &lt;b&gt;egrep&lt;/b&gt; patterns and should use &lt;b&gt;[{]&lt;/b&gt; to match a literal &lt;b&gt;{&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;&lt;font size="2"&gt;GNU&lt;/font&gt; &lt;b&gt;egrep&lt;/b&gt; attempts to support traditional usage by assuming that &lt;b&gt;{&lt;/b&gt; is not special if it would be the start of an invalid interval specification. For example, the shell command &lt;b&gt;egrep '{1'&lt;/b&gt; searches for the two-character string &lt;b&gt;{1&lt;/b&gt; instead of reporting a syntax error in the regular expression. &lt;font size="2"&gt;POSIX.2&lt;/font&gt; allows this behavior as an extension, but portable scripts should avoid it.  &lt;/p&gt; &lt;h1 class="western"&gt;How To Use grep Command In Linux / UNIX&lt;/h1&gt; &lt;p&gt;by Vivek Gite · &lt;a href="http://www.cyberciti.biz/faq/howto-use-grep-command-in-linux-unix/#comments"&gt;54 comments&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-left: 0.13cm;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;a name="more-705"&gt;&lt;/a&gt;How do I use grep command in Linux?&lt;br /&gt;&lt;br /&gt;grep command searches the given file for lines containing a match to the given strings or words. By default, grep prints the matching lines. Use grep to search for lines of text that match one or many regular expressions, and outputs only the matching lines.&lt;/p&gt; &lt;p style="margin-left: 0.13cm;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;The name, "grep", derives from the command used to perform a similar operation, using the Unix/Linux text editor ed:&lt;br /&gt;&lt;em&gt;g/re/p &lt;/em&gt; &lt;/p&gt; &lt;h2&gt;grep command syntax&lt;/h2&gt; &lt;pre&gt;&lt;font color="#c20cb9"&gt;&lt;b&gt;grep&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff0000"&gt;'word'&lt;/font&gt; filename &lt;font color="#c20cb9"&gt;&lt;b&gt;grep&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff0000"&gt;'string1 string2'&lt;/font&gt;  filename &lt;font color="#c20cb9"&gt;&lt;b&gt;cat&lt;/b&gt;&lt;/font&gt; otherfile | &lt;font color="#c20cb9"&gt;&lt;b&gt;grep&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff0000"&gt;'something'&lt;/font&gt; &lt;font color="#7a0874"&gt;&lt;b&gt;command&lt;/b&gt;&lt;/font&gt; | &lt;font color="#c20cb9"&gt;&lt;b&gt;grep&lt;/b&gt;&lt;/font&gt; &lt;font color="#ff0000"&gt;'something'&lt;/font&gt;&lt;/pre&gt;&lt;h2&gt; Use grep to search file&lt;/h2&gt; &lt;p&gt;Search /etc/passwd for boo user:&lt;br /&gt;&lt;code&gt;$ grep boo /etc/passwd&lt;/code&gt;&lt;/p&gt; &lt;p&gt;You can force grep to ignore word case i.e match boo, Boo, BOO and all other combination with -i option:&lt;br /&gt;&lt;code&gt;$ grep -i "boo" /etc/passwd&lt;/code&gt;&lt;/p&gt; &lt;h2&gt;Use grep recursively&lt;/h2&gt; &lt;p&gt;You can search recursively i.e. read all files under each directory for a string "192.168.1.5"&lt;br /&gt;&lt;code&gt;$ grep -r "192.168.1.5" /etc/&lt;/code&gt;&lt;/p&gt; &lt;h2&gt;Use grep to search words only&lt;/h2&gt; &lt;p&gt;When you search for boo, grep will match fooboo, boo123, etc. You can force grep to select only those lines containing matches that form whole words i.e. match only boo word:&lt;br /&gt;&lt;code&gt;$ grep -w "boo" /path/to/file&lt;/code&gt;&lt;/p&gt; &lt;h2&gt;Use grep to search 2 different words  &lt;/h2&gt; &lt;p&gt;use egrep as follows:&lt;br /&gt;&lt;code&gt;$ egrep -w 'word1|word2' /path/to/file&lt;/code&gt;&lt;/p&gt; &lt;h2&gt;Count line when words has been matched&lt;/h2&gt; &lt;p&gt;grep can report the number of times that the pattern has been matched for each file using -c (count) option:&lt;br /&gt;&lt;code&gt;$ grep -c 'word' /path/to/file&lt;/code&gt;&lt;br /&gt;Also note that you can use -n option, which causes grep to precede each line of output with the number of the line in the text file from which it was obtained:&lt;br /&gt;&lt;code&gt;$ grep -n 'word' /path/to/file&lt;/code&gt;&lt;/p&gt; &lt;h2&gt;Grep invert match&lt;/h2&gt; &lt;p&gt;You can use -v option to print inverts the match; that is, it matches only those lines that do not contain the given word. For example print all line that do not contain the word bar:&lt;br /&gt;&lt;code&gt;$ grep -v bar /path/to/file&lt;/code&gt;&lt;/p&gt; &lt;h2&gt;UNIX / Linux pipes and grep command&lt;/h2&gt; &lt;p&gt;grep command often used with pipes. For example print name of hard disk devices:&lt;br /&gt;&lt;code&gt;# dmesg | egrep '(s|h)d[a-z]'&lt;/code&gt;&lt;br /&gt;Display cpu model name:&lt;br /&gt;&lt;code&gt;# cat /proc/cpuinfo | grep -i 'Model'&lt;/code&gt;&lt;br /&gt;However, above command can be also used as follows without shell pipe:&lt;br /&gt;&lt;code&gt;# grep -i 'Model' /proc/cpuinfo&lt;/code&gt;&lt;/p&gt; &lt;h2&gt;How do I list just the names of matching files?&lt;/h2&gt; &lt;p&gt;Use the -l option to list file name whose contents mention main():&lt;br /&gt;&lt;code&gt;$ grep -l 'main' *.c&lt;/code&gt;&lt;br /&gt;Finally, you can force grep to display output in colors:&lt;br /&gt;&lt;code&gt;$ grep --color vivek /etc/passwd&lt;/code&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0cm;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366258948420632812-697032227922296753?l=naveenboss.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://naveenboss.blogspot.com/feeds/697032227922296753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://naveenboss.blogspot.com/2010/02/grep.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/697032227922296753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366258948420632812/posts/default/697032227922296753'/><link rel='alternate' type='text/html' href='http://naveenboss.blogspot.com/2010/02/grep.html' title='grep'/><author><name>naveenbos</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://3.bp.blogspot.com/_ThEdR50O2T4/Sz8D9QbcmeI/AAAAAAAAAF0/3REcC47OFE0/S220/naveen'/></author><thr:total>0</thr:total></entry></feed>
