Category Archives: All

All posts

How to change bash custom prompt ?

By default, shell prompt is displayed hostname and current working directory.

It is composed of some variables called:

  • PS1 – default value is \s-\v\$ .
  • PS2 – default is >
  • PS3 – is used as the prompt for the select command
  • PS4 – default is + and value of this parameter is expanded a to indicate multiple levels of indirection

Prompt is control via a special shell variable.y default, shell prompt is displayed hostname and current working directory.

Here’s how to set the default value:

The result will be:

This is just an example …

Posted in Bash, Commands, Linux. Tagged with , , .

Linux commands : “find” and the option “empty”

The command “find” is quite used to linux.

One of these uses is for finding files and folders that are empty.

Finding empty files:

Finding empty directories:

Counting them is by using pipes, as in the examples below:

We can do the same for those which are not empty.

These are just some simple examples. Can you write more about this using contact page.

Posted in Commands, Linux. Tagged with , .

Using Irrlicht 1.7.2 under Windows XP with Code::Blocks – 3D Engine – Part 2.

To use the 3D engine Irrlicht with Code:: Blocks has to download two programs from the Internet.

I used Code:: Blocks version 10.05 and Irrlicht version 1.7.2 on a Windows XP operating system.

You must install Code:: Blocks and then unzip the archive into a folder Irrlicht.

Select from Code:: Blocks File -> New -> Project … and then choose Irrlicht project as shown below:

irrlicht img

A window will appear and you will need to enter the project name and where it is.

The following image shows the way of linking engine with Code:: Blocks.

Set the environment variable Irrlicht.

irrlicht img

Then choose the folder where your 3D engine is.

irrlicht img

Press right click on project and choose Build.

If this error occurs:

Then createDevice needs a dimension2d<u32> not dimension2d<s32> for the window size.

Change as shown below:

error code::blocks img

If no error occurs, you’ll see how it runs as shown below:

irrlicht run image

This is simple example about Irrlicht. That is all for today.

Posted in 3D, Game engine, Programming, Windows XP. Tagged with , , , .

Creating GUIs with Windows PowerShell

In this tutorial I show you the basics of creating a graphical user interface (GUI) using Windows PowerShell

The framework of libraries .NET also referred to as assemblies, are provided specifically for graphical user interface creation, web application development, business process handling and database access, and more…

WinForms is a subset of the .NET framework designed specifically for the creation of Windows based GUIs.

To start Windows PowerShell from the Start menu, click Start, write powershell, and will see something like:

powershell start

The next image shows us the ways to write source code, command line and Windows PowerShell Integrated Scripting Environment (ISE).

powershell tools

Let’s try one example.I will use source from last tutorial about reading BIOS info.

This is the source code:

Run this script with powershell or with Windows PowerShell Integrated Scripting Environment (ISE)

Now that we have seen a simple GUI created in Windows PowerShell.

powershell GUI

Posted in All, PowerShell, Programming, Windows 7. Tagged with , , .

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

As we know , we used 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 comment:

A shell variable may be assigned using following syntax:



Try this command:

Let’s try a simple script. First we created file with this code:

Let’s see the some outputs:

We’ll see how we work with “Shell Variables”

Good. Let’s set one.

How set this variable ?

First of all, the value of TMOUT…

Now we will set this value to 10

It is 10 ? Let’s see:

Now the terminal will close in 10 seconds of inactivity.

This is the first part of the tutorial.

Posted in Bash, Linux, Programming. Tagged with , , .