<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Cli on Amit Agarwal Linux Blog</title>
    <link>/tags/cli/</link>
    <description>Recent content in Cli on Amit Agarwal Linux Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Fri, 02 Jan 2026 00:00:00 +0530</lastBuildDate>
    
	<atom:link href="/tags/cli/index.xml" rel="self" type="application/rss+xml" />
    
    
    <item>
      <title>Convert Man Pages to ASCII, HTML, Markdown, and PDF (Groff &#43; Pandoc)</title>
      <link>/2026/01/02/2026-01-02-man2pdf/</link>
      <pubDate>Fri, 02 Jan 2026 00:00:00 +0530</pubDate>
      
      <guid>/2026/01/02/2026-01-02-man2pdf/</guid>
      <description>Man pages don’t have to stay trapped in your terminal. Here are the clean, reliable ways to convert any man page to ASCII/text, HTML, Markdown, or PDF—with one-liners and gotchas covered.</description>
    </item>
    
    <item>
      <title>cool sed/grep magic to convert output to csv format</title>
      <link>/2019/03/11/cool-sed-grep-magic-to-convert-output-to-csv-format/</link>
      <pubDate>Mon, 11 Mar 2019 01:12:34 +0000</pubDate>
      
      <guid>/2019/03/11/cool-sed-grep-magic-to-convert-output-to-csv-format/</guid>
      <description>&lt;p&gt;I generallly keep doing this a lot, so thought will share with you. Lets assume we are capturing free ouput every min/hour/or whatever. The output looks like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Time: Mon Jan 21 23:59:10 AEDT 2019&lt;br&gt;
——————-&lt;/p&gt;
&lt;p&gt;total        used        free      shared  buff/cache   available&lt;br&gt;
Mem:          32014        8656        1735        1697       21621       21308&lt;br&gt;
Swap: 51195 75 51120&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;then we can use some grep and sed to convert this to something like this:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Mon Jan 21 23:59:10 AEDT 2019,32014,8656,1735,1697,21621,21308&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>speedtest cli</title>
      <link>/2015/01/30/speedtest-cli/</link>
      <pubDate>Fri, 30 Jan 2015 01:01:47 +0000</pubDate>
      
      <guid>/2015/01/30/speedtest-cli/</guid>
      <description>&lt;p&gt;To test your speed you can use speetest-cli. Here is the description:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Command line interface for testing internet bandwidth using speedtest.net&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and to install and test:&lt;/p&gt;
&lt;pre class=&#34;brush:shell&#34;&gt;sudo yum install speedtest-cli

#Run
speedtest-cli&lt;/pre&gt;
&lt;p&gt;The output is like below:&lt;/p&gt;
&lt;figure id=&#34;attachment_4531&#34; aria-describedby=&#34;caption-attachment-4531&#34; style=&#34;width: 269px&#34; class=&#34;wp-caption aligncenter&#34;&gt;[&lt;img class=&#34;size-full wp-image-4531&#34; src=&#34;https://i2.wp.com/blog.amit-agarwal.co.in/wp-content/uploads/2014/12/speedtest.jpg?resize=269%2C141&#34; alt=&#34;speetest-cli&#34; width=&#34;269&#34; height=&#34;141&#34; data-recalc-dims=&#34;1&#34; /&gt;][1]&lt;figcaption id=&#34;caption-attachment-4531&#34; class=&#34;wp-caption-text&#34;&gt;speedtest-cli&lt;/figcaption&gt;&lt;/figure&gt;</description>
    </item>
    
    <item>
      <title>CLI Color and bash prompt.. some colored fun with prompts in bash</title>
      <link>/2010/06/29/cli-color-and-bash-prompt-some-colored-fun-with-prompts-in-bash/</link>
      <pubDate>Tue, 29 Jun 2010 12:23:10 +0000</pubDate>
      
      <guid>/2010/06/29/cli-color-and-bash-prompt-some-colored-fun-with-prompts-in-bash/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;There are two ways to do it, one is with tput command. We will see that some other time, today we will consider the escape sequence way.&lt;/p&gt;
&lt;p&gt;First we need to understand the colors as understood by bash. Some time back a fried of mine gave me this little script to find the colors. You can download it &amp;lt;a href=&amp;quot;http://blog.amit-agarwal.co.in/2009/03/bash_colors&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;Script bash colors&lt;/a&gt;. Here is the script&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;#!/bin/bash&lt;/p&gt;
&lt;p&gt;T=&amp;amp;#8217;amit agarwal&amp;amp;#8217;   # The test text&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Upload a video to youtube</title>
      <link>/2010/06/23/upload-a-video-to-youtube/</link>
      <pubDate>Wed, 23 Jun 2010 04:33:18 +0000</pubDate>
      
      <guid>/2010/06/23/upload-a-video-to-youtube/</guid>
      <description>&lt;h1 id=&#34;span-stylefont-size-x-largea-hrefhttpfeedproxygooglecomrcommand-line-fu3jxjj-wy4keaupload-a-video-to-youtubeupload-a-video-to-youtubeaspan&#34;&gt;&lt;strong&gt;&amp;lt;span style=&amp;quot;font-size: x-large;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://feedproxy.google.com/~r/Command-line-fu/~3/JXJj-wy4keA/upload-a-video-to-youtube&amp;quot;&amp;gt;Upload a video to youtube&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;&lt;tt&gt;&lt;/p&gt;&lt;/p&gt;
&lt;div class=&#34;codecolorer-container bash solarized-light&#34; style=&#34;overflow:auto;white-space:nowrap;width:550px;&#34;&gt;
  &lt;table cellspacing=&#34;0&#34; cellpadding=&#34;0&#34;&gt;
    &lt;tr&gt;
      &lt;td class=&#34;line-numbers&#34;&gt;
        &lt;div&gt;
          1&lt;br /&gt;
        &lt;/div&gt;
      &lt;/td&gt;
&lt;pre&gt;&lt;code&gt;  &amp;lt;td&amp;gt;
    &amp;lt;div class=&amp;quot;bash codecolorer&amp;quot;&amp;gt;
      google youtube post &amp;lt;span class=&amp;quot;re5&amp;quot;&amp;gt;--title&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;st0&amp;quot;&amp;gt;&amp;quot;My Video&amp;quot;&amp;lt;/span&amp;gt; &amp;lt;span class=&amp;quot;re5&amp;quot;&amp;gt;--category&amp;lt;/span&amp;gt; Education ~&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;/&amp;lt;/span&amp;gt;myvideo.avi&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;lt;/&amp;lt;/span&amp;gt;tt&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;&amp;lt;/span&amp;gt;tt&amp;lt;span class=&amp;quot;sy0&amp;quot;&amp;gt;&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/td&amp;gt;
&amp;lt;/tr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
  &lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;
  &lt;/tt&gt;
&lt;/p&gt;
&lt;p&gt;
  &lt;tt&gt;&lt;/tt&gt; &lt;a class=\&#34;zem_slink freebase/en/google\&#34; title=\&#34;Google\&#34; rel=\&#34;homepage\&#34; href=\&#34;http://google.com\&#34;&gt;Google&lt;/a&gt; just released a new commend line tool offering all sorts of new services from the commend line. One of them is uploading a &lt;a class=\&#34;zem_slink freebase/en/youtube\&#34; title=\&#34;YouTube\&#34; rel=\&#34;homepage\&#34; href=\&#34;http://www.youtube.com/\&#34;&gt;youtube video&lt;/a&gt; but there are plenty more google services to interact with.
&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>concatenate compressed and uncompressed logs</title>
      <link>/2010/06/21/concatenate-compressed-uncompressed-logs/</link>
      <pubDate>Mon, 21 Jun 2010 12:58:46 +0000</pubDate>
      
      <guid>/2010/06/21/concatenate-compressed-uncompressed-logs/</guid>
      <description>&lt;h1 id=&#34;span-stylefont-size-x-largea-hrefhttpfeedproxygooglecomrcommand-line-fu3iwfuyltygjmconcatenate-compressed-and-uncompressed-logsconcatenate-compressed-and-uncompressed-logsaspan&#34;&gt;&lt;strong&gt;&amp;lt;span style=&amp;quot;font-size: x-large;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;http://feedproxy.google.com/~r/Command-line-fu/~3/iwFUyltYgjM/concatenate-compressed-and-uncompressed-logs&amp;quot;&amp;gt;concatenate compressed and uncompressed logs&lt;/a&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;&lt;tt&gt;$ find /var/log/apache2 -name &#39;access.log&lt;em&gt;gz&#39; -exec &amp;lt;a class=&amp;quot;zem_slink freebase/en/gzip&amp;quot; title=&amp;quot;Gzip&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://www.gzip.org/&amp;quot;&amp;gt;zcat&lt;/a&gt; {} ; -or -name &#39;access.log&lt;/em&gt;&#39; -exec cat {} ;&lt;/tt&gt; This command allows you to stream your log files, including gziped files, into one stream which can be piped to &amp;lt;a class=&amp;quot;zem_slink freebase/en/awk&amp;quot; title=&amp;quot;AWK&amp;quot; rel=&amp;quot;homepage&amp;quot; href=&amp;quot;http://cm.bell-labs.com/cm/cs/awkbook/index.html&amp;quot;&amp;gt;awk&lt;/a&gt; or some other command for analysis.&lt;/p&gt;
&lt;p&gt;Note: if your version of &amp;amp;#8217;find&amp;amp;#8217; supports it, use:&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>email with templates (with variables) from the command line with sendmail or any other MTA.</title>
      <link>/2010/06/09/email-with-templates-with-variables-from-the-command-line-with-sendmail-or-any-other-mta/</link>
      <pubDate>Wed, 09 Jun 2010 16:57:10 +0000</pubDate>
      
      <guid>/2010/06/09/email-with-templates-with-variables-from-the-command-line-with-sendmail-or-any-other-mta/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;I was trying to get templates to work on evolution and found that although templates are there in evolution mail client, its not that efficient to use. What I thus wanted was to have something that could allow me to send mails to (and cc and bcc) to specified people with predefined template, only some values changed, like changelog and so on. So I wrote a set of files and below files to achieve the same. Hope it helps you too 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>command line cheat sheet for begineers.</title>
      <link>/2010/05/17/command-line-cheat-sheet-for-begineers/</link>
      <pubDate>Mon, 17 May 2010 15:59:22 +0000</pubDate>
      
      <guid>/2010/05/17/command-line-cheat-sheet-for-begineers/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;A list of commands with some examples posted by Ian &amp;lt;a href=&amp;quot;http://ardchoille42.blogspot.com/2009/08/command-line-cheatsheet.html&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;here&lt;/a&gt;. Looks good for new comers to Linux OS 🙂&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Linux xdg-open — replacement for start in windows</title>
      <link>/2009/11/05/linux-xdg-open-replacement-for-start-in-windows/</link>
      <pubDate>Thu, 05 Nov 2009 03:56:30 +0000</pubDate>
      
      <guid>/2009/11/05/linux-xdg-open-replacement-for-start-in-windows/</guid>
      <description>&lt;!--[ad#ad-2]--&gt;
&lt;p&gt;if you want to open any document with the default document handler from the bash prompt or command prompt in linux then the simplest way to do that is use &amp;amp;#8221;&lt;strong&gt;xdg-open&lt;/strong&gt;&amp;amp;#8221;.&lt;/p&gt;
&lt;p&gt;This can also be used in bash scripts to allow users to select which document to open without worrying about if a particular application is installed or not. Example could be where you have list of documents in the current directory (same kind or of different format.) and you want the user to select the document. In such a scenario you can take the user input for the filename and user &amp;amp;#8221;&lt;strong&gt;xdg-open filename&lt;/strong&gt;&amp;amp;#8221; to open the file irrespective of the file type or worrying about if xpdf is installed or abiword is installed or not.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
