<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Tushar Tyagi</title>
    <description>The latest articles on Forem by Tushar Tyagi (@paraspl01t).</description>
    <link>https://forem.com/paraspl01t</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F315185%2F976a0474-cc47-4a8c-ba2c-9675869a0283.png</url>
      <title>Forem: Tushar Tyagi</title>
      <link>https://forem.com/paraspl01t</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/paraspl01t"/>
    <language>en</language>
    <item>
      <title>First impressions of using XAMPP on Linux for PHP development</title>
      <dc:creator>Tushar Tyagi</dc:creator>
      <pubDate>Sat, 16 Dec 2023 17:13:42 +0000</pubDate>
      <link>https://forem.com/paraspl01t/first-impressions-of-using-xampp-on-linux-for-php-development-5h0g</link>
      <guid>https://forem.com/paraspl01t/first-impressions-of-using-xampp-on-linux-for-php-development-5h0g</guid>
      <description>&lt;p&gt;I started web development 10 years ago. I was around 16 years old when I started learning PHP.&lt;/p&gt;

&lt;p&gt;Just like most php developers at that time I was using plain old Windows 7 and XAMPP for local development and FileZilla for uploading my work to a remote web server running cPanel.&lt;/p&gt;

&lt;p&gt;Since then many things have changed, both in web development industry and also my personal preferences regarding my work environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  About my work
&lt;/h2&gt;

&lt;p&gt;In 10 years I have switched to node.js and regularly work on developing, reviewing and maintaining Node.js based projects.&lt;/p&gt;

&lt;p&gt;I personally use Node.js with Express, MySQL, MongoDB for creating APIs and on frontend I mostly use SvelteKit and TailwindCSS.&lt;/p&gt;

&lt;p&gt;For PHP, I have a custom docker environment I use for all my PHP projects.&lt;/p&gt;

&lt;h2&gt;
  
  
  My current setup
&lt;/h2&gt;

&lt;p&gt;Currently I'm using Arch Linux with GNOME Desktop environment on a failry old development machine : Dell Latitude 3400. It's not new but it gets the job done without any bottlenecks with 8GB of RAM, Intel core i5 8th Gen processor and a 1920x1080 panel which I recently upgraded.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1VXaefrW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7srx2go6jg884yem86u5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1VXaefrW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7srx2go6jg884yem86u5.png" alt="Screenshot of terminal running neofetch" width="800" height="570"&gt;&lt;/a&gt;Screenshot of terminal running neofetch2&lt;/p&gt;

&lt;p&gt;I'm aware that this setup will not work for most you guys as the specs are quite low. But, remember that web development on my tech stack doesn't require very high specs anyway.&lt;/p&gt;

&lt;p&gt;And Linux based OS generally provide a significant performance boost compared to windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why PHP?
&lt;/h2&gt;

&lt;p&gt;Most of you are probably asking that question and let me tell you that PHP still a has a massive share for low to medium size websites.&lt;/p&gt;

&lt;p&gt;As much as I love node, sometimes I have to work on PHP projects that can not be handled by my juniors. Untill now I was happy to work on PHP in my docker environment but recently, It came to my attention that XAMPP is available for linux as well.&lt;/p&gt;

&lt;p&gt;I just had a SSD change recently and I'm currently in the process of setting up the machine for development. Docker is still not installed and I decided to install XAMPP instead and see how it goes.&lt;/p&gt;

&lt;p&gt;For old time's sake, I had to try it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using XAMPP
&lt;/h2&gt;

&lt;p&gt;XAMPP is available in AUR (Arch User Repository) as &lt;code&gt;xampp&lt;/code&gt; and installing it would be quite simple by using a package manager that supports AUR.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;paru &lt;span class="nt"&gt;-S&lt;/span&gt; xampp
&lt;span class="c"&gt;# or yay -S xampp&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But I decided to install it using the "Official" method.&lt;/p&gt;

&lt;p&gt;Step 1-&lt;br&gt;
Visit &lt;a href="https://www.apachefriends.org/download.html"&gt;https://www.apachefriends.org/download.html&lt;/a&gt; and download the &lt;code&gt;.run&lt;/code&gt; file for linux.&lt;/p&gt;

&lt;p&gt;Step 2-&lt;br&gt;
Open console and navigate to the location where the file was downloaded and make the file executable by using :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;755 xampp-linux-&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="nt"&gt;-installer&lt;/span&gt;.run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 3-&lt;br&gt;
Launch the installer by using :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; ./xampp-linux-&lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="nt"&gt;-installer&lt;/span&gt;.run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It opens the installer that will install xampp in &lt;code&gt;/opt/lampp&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EOGBFz1H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1dvpw7l8l561cnr1tc5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EOGBFz1H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1dvpw7l8l561cnr1tc5.png" alt="Screenshot of XAMPP Installer on Linux" width="800" height="709"&gt;&lt;/a&gt;Screenshot of XAMPP Installer on Linux&lt;/p&gt;

&lt;p&gt;Now the installation process is as straightforward as clicking next a few times.&lt;/p&gt;

&lt;p&gt;After installation is finished, the XAMPP control panel starts automatically and the UI difference is immediatly noticeable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ckeoSo7i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rsbjfotqxbbv1zp5unli.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ckeoSo7i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rsbjfotqxbbv1zp5unli.png" alt="Screenshot of XAMPP Control Panel" width="800" height="594"&gt;&lt;/a&gt;Screenshot of XAMPP Control Panel&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6YG-jVTj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mk1k3m7t75qsfad1vk82.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6YG-jVTj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mk1k3m7t75qsfad1vk82.png" alt="Screenshot of XAMPP Control Panel" width="800" height="594"&gt;&lt;/a&gt;Screenshot of XAMPP Control Panel&lt;/p&gt;

&lt;p&gt;Looks outdated but I'll manage. On 'Manage Servers' tab, I tried to start apache and mysql but it did not start. On viewing application logs, I found an error complaining about libcrypt.so.1. A quick google search provided a solution and I installed this package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;pacman &lt;span class="nt"&gt;-S&lt;/span&gt; libxcrypt-compat
&lt;span class="c"&gt;# or paru -S libxcrypt-compat&lt;/span&gt;
&lt;span class="c"&gt;# or yay -S libxcrypt-compat&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I closed the XAMPP control panel and tried to find it in applications menu. Apparently XAMPP installer does not create .desktop files needed so it does not show in applications menu.&lt;/p&gt;

&lt;p&gt;I dug into the &lt;code&gt;/opt/lampp&lt;/code&gt; directory and found two executable files named &lt;code&gt;lampp&lt;/code&gt; and &lt;code&gt;manager-linux-x64.run&lt;/code&gt;. The first file was a command line interface to xampp&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a50TcNte--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbcnmnvwks784zpce25k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a50TcNte--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbcnmnvwks784zpce25k.png" alt="Screenshot of 'lampp' executable in CLI" width="800" height="716"&gt;&lt;/a&gt;Screenshot of 'lampp' executable in CLI&lt;/p&gt;

&lt;p&gt;Running it gives the above output and it provided the command to open graphical panel. But he command &lt;code&gt;sudo /opt/lampp/lampp panel&lt;/code&gt; does nothing (maybe a bug) So i decided to try the second executable file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo&lt;/span&gt; /opt/lampp/manager-linux-x64.run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It opens the panel and now I can successfully start apache and mysql services. Everything works as expected and now I can create my PHP projects in &lt;code&gt;/opt/lampp/htdocs&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;Since &lt;code&gt;/opt/lampp/htdocs&lt;/code&gt; is owned by root user, I need to chown this directory to my normal user by using chown command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; &lt;span class="nv"&gt;$USER&lt;/span&gt;:&lt;span class="nv"&gt;$USER&lt;/span&gt; /opt/lampp/htdocs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One thing I do on Linux is enable virtual hosts for the projects. Ex: &lt;code&gt;http://localhost/project1&lt;/code&gt; turns into &lt;code&gt;http://project1.local&lt;/code&gt; and so on.&lt;/p&gt;

&lt;p&gt;To do this we need to create the project folder with an &lt;code&gt;index.php&lt;/code&gt; file to test.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;// contents of /opt/lampp/htdocs/project1/index.php
&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="nb"&gt;phpinfo&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="cp"&gt;?&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we can enable virtual hosts file support in apache by editing &lt;code&gt;httpd.conf&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nano /opt/lampp/etc/httpd.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and remove the &lt;code&gt;#&lt;/code&gt; from the line &lt;code&gt;Include etc/extra/httpd-vhosts.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Next step is to re enable &lt;a href="http://localhost"&gt;http://localhost&lt;/a&gt; and add a new virtual host entry for &lt;a href="http://project1.local"&gt;http://project1.local&lt;/a&gt; by editing &lt;code&gt;/opt/lampp/etc/extra/httpd-vhosts.conf&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is how the file looks like after adding appropriate entries:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&amp;lt;&lt;span class="n"&gt;VirtualHost&lt;/span&gt; *:&lt;span class="m"&gt;80&lt;/span&gt;&amp;gt;
&lt;span class="n"&gt;DocumentRoot&lt;/span&gt; /&lt;span class="n"&gt;opt&lt;/span&gt;/&lt;span class="n"&gt;lampp&lt;/span&gt;/&lt;span class="n"&gt;htdocs&lt;/span&gt;
&lt;span class="n"&gt;ServerName&lt;/span&gt; &lt;span class="n"&gt;localhost&lt;/span&gt;
&lt;span class="n"&gt;ServerAlias&lt;/span&gt; &lt;span class="n"&gt;www&lt;/span&gt;.&lt;span class="n"&gt;localhost&lt;/span&gt;
&amp;lt;/&lt;span class="n"&gt;VirtualHost&lt;/span&gt;&amp;gt;

&amp;lt;&lt;span class="n"&gt;VirtualHost&lt;/span&gt; *:&lt;span class="m"&gt;80&lt;/span&gt;&amp;gt;
&lt;span class="n"&gt;DocumentRoot&lt;/span&gt; /&lt;span class="n"&gt;opt&lt;/span&gt;/&lt;span class="n"&gt;lampp&lt;/span&gt;/&lt;span class="n"&gt;htdocs&lt;/span&gt;/&lt;span class="n"&gt;project1&lt;/span&gt;
&lt;span class="n"&gt;ServerName&lt;/span&gt; &lt;span class="n"&gt;project1&lt;/span&gt;.&lt;span class="n"&gt;local&lt;/span&gt;
&lt;span class="n"&gt;ServerAlias&lt;/span&gt; &lt;span class="n"&gt;www&lt;/span&gt;.&lt;span class="n"&gt;project1&lt;/span&gt;.&lt;span class="n"&gt;local&lt;/span&gt;
&amp;lt;/&lt;span class="n"&gt;VirtualHost&lt;/span&gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Last step is to add entry for project1 in the &lt;code&gt;/etc/hosts&lt;/code&gt; file. The contents of this file will look like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;127.0.0.1 project1.local
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now after restarting apache I can access the project from &lt;a href="http://project1.local"&gt;http://project1.local&lt;/a&gt; which makes using absolute path on development same as on production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;As XAMPP has it's own cli binary, we don't even need to open xampp control panel. And the process of creating the virtual hosts can be automated with a simple bash script. One can even make a better control panel than XAMPP which supports creating projects, virtual hosts and managing server and configurations.&lt;/p&gt;

&lt;p&gt;The installation was simple but the first run required some troubleshooting. Apart from that UI is quite outdated and cli option to open panel did not work.&lt;/p&gt;

&lt;p&gt;As you can see using XAMPP on Linux has it's own issues but you can easily find workarounds. So far it's simpler than a docker environment and provide all features needed to develop a PHP project.&lt;/p&gt;

&lt;p&gt;I'm gonna keep using it for more time and see how it goes. &lt;/p&gt;

&lt;p&gt;Now this was a random article but I had fun writing it and sharing it with you guys. If you guys have any questions or suggestions please let me know in the comments below.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Tushar Tyagi&lt;br&gt;
CTO @ &lt;a href="https://spexoid.com"&gt;Spexoid Tech&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>php</category>
      <category>xampp</category>
      <category>linux</category>
      <category>development</category>
    </item>
    <item>
      <title>What are some useful bash aliases you use?</title>
      <dc:creator>Tushar Tyagi</dc:creator>
      <pubDate>Thu, 24 Sep 2020 16:07:46 +0000</pubDate>
      <link>https://forem.com/paraspl01t/what-are-some-usefull-bash-aliases-you-use-j37</link>
      <guid>https://forem.com/paraspl01t/what-are-some-usefull-bash-aliases-you-use-j37</guid>
      <description>&lt;h2&gt;
  
  
  Here are mine.
&lt;/h2&gt;

&lt;h4&gt;
  
  
  1. yeet (delete) the directory and all it's contents.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;yeet&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"rm -rf"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  2. quickly move one or two directory up in bash.
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias&lt;/span&gt; ..&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"cd .."&lt;/span&gt;
&lt;span class="nb"&gt;alias&lt;/span&gt; ...&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"cd ../.."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  3. [function] Extract files from any archive. (stolen from Manjaro's Default bashrc)
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ex &lt;span class="o"&gt;()&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;$1&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    case&lt;/span&gt; &lt;span class="nv"&gt;$1&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.tar.bz2&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="nb"&gt;tar &lt;/span&gt;xjf &lt;span class="nv"&gt;$1&lt;/span&gt;   &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.tar.gz&lt;span class="p"&gt;)&lt;/span&gt;    &lt;span class="nb"&gt;tar &lt;/span&gt;xzf &lt;span class="nv"&gt;$1&lt;/span&gt;   &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.bz2&lt;span class="p"&gt;)&lt;/span&gt;       bunzip2 &lt;span class="nv"&gt;$1&lt;/span&gt;   &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.rar&lt;span class="p"&gt;)&lt;/span&gt;       unrar x &lt;span class="nv"&gt;$1&lt;/span&gt;     &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.gz&lt;span class="p"&gt;)&lt;/span&gt;        &lt;span class="nb"&gt;gunzip&lt;/span&gt; &lt;span class="nv"&gt;$1&lt;/span&gt;    &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.tar&lt;span class="p"&gt;)&lt;/span&gt;       &lt;span class="nb"&gt;tar &lt;/span&gt;xf &lt;span class="nv"&gt;$1&lt;/span&gt;    &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.tbz2&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="nb"&gt;tar &lt;/span&gt;xjf &lt;span class="nv"&gt;$1&lt;/span&gt;   &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.tgz&lt;span class="p"&gt;)&lt;/span&gt;       &lt;span class="nb"&gt;tar &lt;/span&gt;xzf &lt;span class="nv"&gt;$1&lt;/span&gt;   &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.zip&lt;span class="p"&gt;)&lt;/span&gt;       unzip &lt;span class="nv"&gt;$1&lt;/span&gt;     &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.Z&lt;span class="p"&gt;)&lt;/span&gt;         uncompress &lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;.7z&lt;span class="p"&gt;)&lt;/span&gt;        7z x &lt;span class="nv"&gt;$1&lt;/span&gt;      &lt;span class="p"&gt;;;&lt;/span&gt;
      &lt;span class="k"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"'&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;' cannot be extracted via ex()"&lt;/span&gt; &lt;span class="p"&gt;;;&lt;/span&gt;
    &lt;span class="k"&gt;esac&lt;/span&gt;
  &lt;span class="k"&gt;else
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"'&lt;/span&gt;&lt;span class="nv"&gt;$1&lt;/span&gt;&lt;span class="s2"&gt;' is not a valid file"&lt;/span&gt;
  &lt;span class="k"&gt;fi&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Please do not forget to share yours.&lt;/p&gt;

</description>
      <category>bash</category>
      <category>shell</category>
      <category>linux</category>
      <category>unix</category>
    </item>
  </channel>
</rss>
