Category Archives: Programming

programming

Parsing files and rename …

Sometimes you have to rename files. This can be tiring when we do it manually. Command sed may be helpful in this case. I’ll take a simple example. I will create a working directory called work. We have to create files with the command:

The result should be :

Try these commands to… Read More »

Convert text to HTML using regular expressions with Geany – part 004.

Open a blank page and write this text in Geany:

Press CTRL + H and make changes as shown below: The text will be ahead html paragraph tag. The text will be the end of the paragraph html tag end of each line. So I turned a simple text in html source code.

BASH shell scripting tips – part 1 : Working with shell variables.

As we know, we used the following syntax will to create a default script bash. First line: signifies that is the bash script:

Every line and everything after the # is treated as a comment:

A shell variable may be assigned using the following syntax: variable=value_of_variable Example:

Try this command:

Read More »

Fedora 12 – How can we run one script when system startup?

Open one xterm or console. Use command cd /etc/init.d/ . You are now on /etc/init.d/ directory. Create a file named my_filename. Add your script to this file with the following lines at the top:

Enter this in the shell: chkconfig –add my_filename Use command chmod u+x my_filenameto make this script executable. Type command:ntsysv You… Read More »