Linux

Bash shell script to reverse text file content

Shell script to reverse text file contain i.e. concatenate files and print on the standard output in reverse. This script also demonstrate how to use arrays under bash shell script. reverse-text-file.bash #!/bin/bash # Bash shell script to reverse text file contain i.e. concatenate files and # print on the standard output in reverse. This script […]

Read More
Linux

mod_rewriting an entire site

Using mod_rewrite to redirect all pages to one central PHP page’. On my site, I decided to use an all-index structure, as that’s how I prefer to do things – it means that the scripting language is more hidden from the end user than if you linked to pages such as “something-bizarre.jsp” and means that […]

Read More
Scripting

mod_rewrite, a beginners guide (with examples)

mod_rewrite is used for rewriting a URL at the server level, giving the user output for that final page. So, for example, a user may ask for http://www.somesite.com/widgets/blue/, but will really be given http://www.somesite.com/widgets.php?colour=blue by the server.

Read More