1

Shell Script to execute a command on every line of a file

Posted by Joys of Programming on in Linux, Shell Scripting

There are many times, where you want to execute the same command every line of a file, it can be simple printing on the screen or some other manipulation. This simple shell script reads a file line by line and executes the command specified by the user on the line. As you can see that [...]

Tags: ,

 
0

Shell Script to extract various sections of a Man page

Posted by Joys of Programming on in Linux, Shell Scripting

A Man page has various sections like NAME SYNOPSIS DESCRIPTION EXAMPLE AUTHORS The above are some of the few sections to name for. You open a man page using the command man. It can also be redirected to a file. Let’s see the script As you can see that it takes three arguments, The Man [...]

Tags: , ,

 
0

How to install zsh in Ubuntu

Posted by Joys of Programming on in Shell Scripting, Ubuntu

Bash is the commonly used shell. ksh and csh are the other shells. Zsh or the Z shell can also be used to execute commands. To install zsh in Ubuntu Start working with zsh by entering zsh on the current shell

 
0

How to install ksh in Ubuntu?

Posted by Joys of Programming on in Shell Scripting, Ubuntu

Like Bash and csh, ksh is also a shell available in almost all Linux/Unix variants. Ksh is KornShell. Like Bash, the most commonly used shell, ksh is also used to enter and execute commands To install ksh in Ubuntu To start working with ksh Enter the commands at the ksh prompt

Tags: ,

 
0

How to install csh in Ubuntu?

Posted by Joys of Programming on in Shell Scripting, Ubuntu

You may have worked with the Terminal a number of times and if you are a command line enthusiast, you may have definitely heard about bash. bash is a command language interpreter. It is an acronym for Bourne again Shell. Like bash, there are plenty of other shells, one of which is csh. It’s a [...]

Tags: ,

 
0

apt-get: Shell Script to remove the packages mentioned in a File

Posted by Joys of Programming on in dpkg, Shell Scripting, Ubuntu

Check this simple shell script which reads all the packages mentioned in a file and removes them one by one. To use this script, mention the packages to be removed in a file. Take for example, pkgs.txt contains the files to be removed To execute the above script, It will remove all the packages one [...]

Tags: , ,

 
0

Shell script to find the length of a string

Posted by Joys of Programming on in Linux, Shell Scripting

awk has a built in function called length with which you can find the length of a string. The following shell script shows how to find the length of the string with awk On executing the program You can even find the length from the terminal with this simple command or Thus you can see [...]

Tags: , , ,

Copyright © 2009-2012 Joys of Programming All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.