Monday, May 26, 2014

[Solved] Linux Commands Challenge : 003

Fancy your Linux skills ? Take this challenge and answer these simple 5 questions on Linux Shell Scripting.

Update : Added solutions


  1. What command(s) would you use to extract the 3 words in the string “The boy laughed” ?
      • There are many variants for this. One of the solutions is as follows :
      • echo $string | cut -d” “ -f1 ; echo $string | cut -d” “ -f2 ; echo $string | cut -d” “ -f3
      • Do let me know about other possible ways to solve this through your comments to this post

  2. What command(s) would you use to fetch only the 6th and 7th lines of a text file : poem.txt
      • This also has many variants. One of the solutions is as follows :
      • head -n 7 poem.txt | tail -2
      • Do let me know about other possible ways to solve this through your comments to this post

  3. What command(s) would you use to delete all empty/blank lines in a file : data.txt
      • grep -v ‘^$’ data.txt

  4. What does the following sed command do ? : sed -n ‘/[0-9]/p’ data.txt
      • Prints only those lines that have a numerical in them.

  5. What command(s) would you use to count the number of files ending with .log in /var/log directory and also have the word “error” in their contents ?
      • grep -l error /var/log/*.log

Linux Weekly NewsBytes : 1423

Here is a list of the latest, most happening events and news items from the Linux World. Keep reading to find out what's making the most noise around Linux this week

  • That link takes to a small presentation on how Linux Mint looks. It is touted as the best alternative for people accustomed to using Windows desktop. This is on my next list of distributions to try. You should be hearing from me on how true that earlier claim is. Linux Mint 17 can be downloaded from : http://www.linuxmint.com/release.php?id=22 
  • Another dock and application launcher for Linux. Can be installed on latest Ubuntu 14.04 as well. Boast of increasing productivity when it comes to launching applications and finding files on your system. Try it out and let me know if it really helps you improve your productivity. I am planning to put this to test myself.
 ∅  ∅ Not a very happening week in the Linux world I suppose.  ∅  ∅

Monday, May 19, 2014

[Solved] Linux Commands Challenge : 002

Fancy your Linux skills ? Take this challenge and answer these simple 5 questions on Linux Environment variables.

Update : Added Solutions


  1. How can variables defined in one Bash Shell script be made visible in its child Bash Shell script ?
      • You need to export the variable in the parent Bash Shell Script, for the variables to be visible in its child Bash Shell script.

  2. How can one find out the type of the Shell he/she is using ?
      • echo $SHELL

  3. Name the C function call that can be used in a C program to fetch the value of a Shell Environment variable
      • getenv()

  4. One can use "printenv" command to list all the Global Environment variables, but what command can we use to list the Local Environment Variables ?
      • You can use "set". But, it list all the environment variables, global and local. You will have to write a Shell Script to prune out Global environment variables from the output of "set" to derive the final list of Local Environment variables. Local environment variables are the variables that are local to the current shell.

  5. How can you find out the current Bash Shell's parent process id ?
      • echo $PPID

Linux Weekly NewsBytes : 1422

Here is a list of the latest, most happening events and news items from the Linux World. Keep reading to find out what's making the most noise around Linux this week

GNOME 3.12.2 has been released

Make sure you take a good look at the GNOME 3 cheat sheet
  • This is the second update for GNOME 3.12. Significant fixes in the almost 40 modules that have been updated include :
    • IMAPx changes to evolution-data-server
    • Memory leak fixes in epiphany
    • Windows Live support has been *removed* from Gnome-online-accounts
    • Gnome-shell bug fixes mainly for airplane mode
    • Several fixes for Gnome-Shell-Extensions, GTK+, gvfs, nautilus, totem, tracker & zenity
  • With Microsoft withdrawing support for Windows XP, many Linux distributions are using this as the best opportunity to lure Windows users to the safe world of Linux. Linux Lite [ at least going by the screenshots ] is a safe bet for the first timer who wants to step out of his closed room of Windows and open the door to the beautiful world of Linux.
  • This is rather old news, but worth mentioning it here, I thought. For all your enthusiastic would-be Kernel developers, don't miss out the Eudyptula Challenge. Its a simple challenge which gives you one task to work on. You need to follow all the Linux Kernel Development community guidelines for creating these tasks. This helps to drill you through the real development process. You get your second task only after completing the first. And then the third and so on. Once you have completed 20 tasks, you would be all set and ready to contribute more quality code into Linux Kernel.

Saturday, May 17, 2014

Linux Weekly NewsBytes : 1421

This is my first Linux Weekly NewsBytes post. You will find here the latest, most happening events and news items from the Linux World. Keep reading to find out what's making the most noise around Linux

Linus Torvalds [ the man who created Linux ] awarded Computer Pioneer Award by IEEE Computer Society

  • The press release by IEEE Computer Society mentions that "Computer Pioneer Award" of 2014 was presented to Linus Torvalds, the man who created Linux. I see this as a recognition of his new approach to create software using open source culture. It actually show cases to the world the real way of creating software. Collaborative and free for anyone to contribute.

Munich City Council migrates 15,000 workers from Windows to Linux

  • This is one news that I loved reading the most this week. It is a great success story that has a great potential to be replicated. And India is certainly the biggest market for such a migration. This initiative was called : LiMux [ Linux in Munich ]. The detailed information in the article shows that it takes a lot of time [ almost 10 years for Munich ] and some real hard Political backing for such a thing to happen. Interestingly enough the deciding factor for this was not Money !!! It was rather a concern for security and a willingness of the Government to promote local companies. They decided that it was much better to send the money to local companies instead of sending it overseas :-)
  • This is the first Ubuntu release that I downloaded and I am still trying it out. I will update more on my learnings from this in some other articles later. Its server image boasts of coming loaded with the latest OpenStack release. This seems to be a good strategy of Ubuntu to move into the Enterprise audience.




[ Since this is my first ever newsletter about Linux, I took the liberty to pick from articles that are earlier to the previous week as well. ]

Monday, May 12, 2014

[Solved] Linux Commands Challenge : 001

Fancy your Linux skills ? Take this challenge and answer these simple 5 questions on Linux Commands.

Update : Added Solutions

Winner : Congratulations to Laxmeesha TV for getting the highest number [ 3 ] of correct solutions.


  1. Which Linux command would you use to replace all the occurrences of "Computer Science" in the file "subjects.list" with “CS”. Make sure you create a backup of the original file as well.
      • sed -i “.bkp” s/“Computer Science”/CS/g subjects.list

  2. What is the command to list all the hidden files of the present working directory ?
      • ls -la

  3. What is the command to list only the first two lines of subjects.list file ?
      • head -2 subjects.list

  4. Print the contents of subjects.list file in reverse order. [ Hint : Cats have tails ]
      • cat subjects.list | tail -r

  5. Which Bash command would you issue on a Linux machine to create a coredump of a running program. [ Hint : The flight was aborted due to bad weather ]
      • kill -6

Linux Weekly NewsBytes : 0001

This is my first Linux Weekly NewsBytes post. You will find here the latest, most happening events and news items from the Linux World. Keep reading to find out what's making the most noise around Linux

Linus Torvalds [ the man who created Linux ] awarded Computer Pioneer Award by IEEE Computer Society

  • The press release by IEEE Computer Society mentions that "Computer Pioneer Award" of 2014 was presented to Linus Torvalds, the man who created Linux. I see this as a recognition of his new approach to create software using open source culture. It actually show cases to the world the real way of creating software. Collaborative and free for anyone to contribute.

Munich City Council migrates 15,000 workers from Windows to Linux

  • This is one news that I loved reading the most this week. It is a great success story that has a great potential to be replicated. And India is certainly the biggest market for such a migration. This initiative was called : LiMux [ Linux in Munich ]. The detailed information in the article shows that it takes a lot of time [ almost 10 years for Munich ] and some real hard Political backing for such a thing to happen. Interestingly enough the deciding factor for this was not Money !!! It was rather a concern for security and a willingness of the Government to promote local companies. They decided that it was much better to send the money to local companies instead of sending it overseas :-)
  • This is the first Ubuntu release that I downloaded and I am still trying it out. I will update more on my learnings from this in some other articles later. Its server image boasts of coming loaded with the latest OpenStack release. This seems to be a good strategy of Ubuntu to move into the Enterprise audience.


[ Since this is my first ever newsletter about Linux, I took the liberty to pick from articles that are earlier to the previous week as well. ]