We\'ve detected that you\'re using AdBlock Plus or some other adblocking software. Please be aware that this is only contributing to the demise of the site. We need money to operate the site, and almost all of that comes from our online advertising.

Linux tips and tricks for all users.

Windows Powershell not as good as BASH shell and other thoughts.

It is really amazing that the new Windows Powershell is moving Windows Administrators back towards the command-line instead of using the GUI for everything. Powershell has some very good features; but the difficulty I have experienced installing extra cmdlets is very grating indeed. It is better to use the BASH shell, as it is very powerful indeed. Such constructs as ls -hula 1234-[0-9].jpeg that let you return a listing of all files that start with 1234- then a number and the extension .jpeg. That is a very good feature of the BASH shell indeed. There are some good Linux tricks here; http://www.securitronlinux.com/bejiitaswrath/cispa-bill-still-a-threat-and-awesome-linux-shell-tricks/. This shows how to convert the output of a variable on the BASH shell into uppercase. This shows how flexible the BASH shell is. This posting here: http://www.securitronlinux.com/bejiitaswrath/how-to-use-aliases-with-the-bash-shell-and-some-other-useful-linux-tricks/, shows how to create aliases with the BASH shell and some other very useful Linux commands. The Windows Server 2012 installation is a command-line only install with only a Powershell window for company.

The Windows Server product is very popular; but Linux offers greater security and stability. That is why it is gaining in popularity. With the mainstream coverage of the new Ubuntu mobile operating system that is to be deployed on mobile `phones, the Linux operating system will gain in popularity. GNU GPL software is everywhere; the router I purchased for my Internet connection uses GPLed software and I may send away for a CDROM containing the source code of the firmware if I wish. I only need to pay a small fee to cover the costs of burning a CDROM and sending it to me which is within the terms of the GNU Public License. Therefore it is OK to sell a product that contains GPL code as long as the source code is available either from your website or upon request. This is not a bad thing. Many devices these days run Linux. The Google Android operating system uses the Linux kernel and a subset of Linux commands is available in a terminal emulator app that may be installed. Managing the files on your system though is restricted unless you can get root access to the device. So the Android devices are locked down to a point. But they still are very useful. There is even a Google Adsense app for keeping track of your Adsense earnings. But Linux on a laptop or desktop is still better for learning and using the command-line easily. A distribution like Ubuntu or Linux Mint 14 would be easier to install than something like Gentoo that has confusing USE flags to install certain software and this makes it very frustrating to install indeed.

I have installed Gentoo before and the contents of my make.conf are listed here: http://www.securitronlinux.com/uncategorized/gentoo-installation/. I might use this USE string to build my current system as I am having a lot of trouble getting DBUS and UDEV working at the moment. I can install the kernel and install a basic desktop fine as well as ATI drivers; but I am having a lot of trouble getting the DBUS and UDEV support working. I want to build a Gentoo system as I like that distribution. Despite the frustration of the initial installation; it is a good Linux distribution. Even though it is not entirely a free distribution and includes a lot of non-free software. But I will sort this out very soon. I forgot about my old Gentoo posting; it will be very useful indeed when I try that distribution again. I had to wipe what I had done and re-install the Stage3 and Portage tarballs again. But I will give it a red hot go and it should be working again. Or I will install Arch Linux instead. One Linux distribution I really have not tried is Slackware. I have used a distribution that is like Slackware; but in the early days of my Linux adventures I preferred OpenSUSE and Mandrake Linux instead. They were easy to install and had a massive amount of software on their five CD`s or one DVD. I used to have an OpenSUSE 9.2 DVD that was 8.5 Gigabytes and came with a huge amount of software. That was fun to install.

3 Comments

  • anonymous
    Posted January 11, 2013 at 4:38 AM | Permalink

    Just wondering about the argumentation. PowerShell supports the use cases you gave BASH examples for in a very similar manner.

    # creating 100 example files in the user’s temp directory
    1..100 | % {new-item -path $env:TEMP -itemtype file -name “1234-$($_).txt”}
    # get all files with a single digit after “-”
    ls $env:TEMP\1234-[0-9].txt

    # convert a string to uppercase
    ‘this is an uppercase string’.ToUpper()

    # setting an alias
    man set-alias -examples

    • Posted January 13, 2013 at 7:57 PM | Permalink

      The Powershell also supports more simple UNIX styled syntax like this:

      PS C:\Users\Homer\Documents> ls tn[0-9]*

      Directory: C:\Users\Homer\Documents

      Mode LastWriteTime Length Name
      —- ————- —— —-
      -a— 17/01/2010 23:18 51122 tn09-559.lmp
      -a— 18/01/2010 00:25 6262 tn09-559.txt

      That is easier than the above example.

  • powersheller
    Posted January 11, 2013 at 8:25 PM | Permalink

    PowerShell makes bash look like a tug-tug in a Le Mans race. Bash doesn’t come close to what can be achieved with PowerShell, which is better documented, much more coinsistent, fuller featured, better designed and much more versatile.

Post a Comment

Your email is kept private. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *