≡ Menu

Linux

Question: Is it possible for me to combine multiple sed commands? Can I combine two sed commands and execute it as single sed command? Answer: In our previous articles we learned sed with single commands — printing, deletion, substitute and file write. In this article let us review how to combine multiple sed commands using [...]

{ 9 comments }

Do You Like to Perform Vi Style Editing in BASH Command Line ?

Question: I like Vi style of editing and I’m very comfortable with Vi commands. How do i use Vi style line editing in Unix command line? Answer: Execute set -o vi at your Unix shell to enable Vi style editing. Enable Vi Style Editing in BASH $ set -o vi By default the command line [...]

{ 1 comment }

Debian based systems (including Ubuntu) uses apt-* commands for managing packages from the command line. In this article, using Apache 2 installation as an example, let us review how to use apt-* commands to view, install, remove, or upgrade packages. 1. apt-cache search: Search Repository Using Package Name If you are installing Apache 2, you [...]

{ 17 comments }

From Vim editor, move your cursor to a number and press Ctrl+A to increase the number or Ctrl+X to decrease the number. Ctrl+A to increase the number under cursor Ctrl+X to decrease the number under cursor Ctrl-A and Ctrl-X will work only on numbers. However using Speeddating Vim plugin, you can use Ctrl+A and Ctrl+X [...]

{ 3 comments }

Unix Shell Tips: Change Login Shell From Bash to Others

Question: How do I find out what Unix shell I’m currently running? Can you also explain how can I change my Unix shell both temporarily and permanently? (For example, from bash to tsh). Answer: You can achieve these using $0, exec, chsh -s. In this article, let us review how to do these in detail. [...]

{ 12 comments }

Question: I would like to understand the basics of how to write and execute a pascal program on Linux OS. Can you explain it with a simple example? Answer: In this article, let us review very quickly how to write a basic Hello World pascal program and execute *.p or *.pas program on Linux or [...]

{ 2 comments }

This article is part of Unix Sed Tutorial series. In previous articles, we discussed about sed print operation , sed delete operation and sed find and replace. In this article, let us review how to extract part of one file and write it to another file using sed. Sed provides “w” command to write the [...]

{ 8 comments }

Book Review: Perl Best Practices by Damian Conway

This is an essential book for both developers and sysadmins who write Perl code to get their job done. Perl is very powerful language and there are several ways you can code in Perl to get the same results. If you are not careful, you may end-up writing Perl code that is very hard to [...]

{ 1 comment }