Tags » Shell Script

Demo: How to invoke a Shell Script on a HTML Page being served by Apache on Linux Machine

Demo: How to invoke a Shell Script on a HTML Page being served by Apache on Linux Machine

Step 1: Put your shell script in cgi-bin directory. 386 more words

Linux

A bash example of processing both short and long command line arguments without using getopts or getopt

Processing command line arguments from bash getopts is limited to single character flags.  When writing scripts, I find it useful and/or necessary to use longer flag names both with and without arguments. 824 more words

Joseph Tingiris

Change sed's default delimiter to delete line(s)

The problem

When you want to delete a line or several in a file using sed you need to use that syntax:

root@machine:~# sed -i '/mymatch/d' test
… 171 more words
Script

Bash locale problem with cron

The problem

One problem that can occur when you do bash scripting concerns the locale. If you run a script directly from the prompt or from a cron, you can have some differences. 295 more words

Script

How to delete lines with sed

In this post I am going to show you the use of delete in sed. I am using file named as data2 below are the contents of that file. 346 more words

Basic Usage

How to use sed to append, delete and insert lines in file

In this post i am going to show you the basic usage of sed command while inserting, deleting and appending lines to file.

I have created one basic file name as data1. 315 more words

Basic Usage