Monthly Archives: October 2013


Remove the last character from a bash variable

The following method, removes the last character from a bash variable by using a regular expression that matches any character.

VAR=${VAR%?};

The functionality ${string%substring} deletes shortest match of $substring from the back of $string.
The question mark ? matches zero or one of the previous regular expression. It is generally used for matching single characters.
So by using ? as our $substring we instruct bash to match any character at the end of the variable and remove it.

Example

$ VAR="Banana";
$ VAR=${VAR%?};
$ echo $VAR;
Banan


Remove the first character from a bash variable

The following method, removes the first character from a bash variable by using a regular expression that matches any character.

VAR=${VAR#?};

The functionality ${string#substring} deletes shortest match of $substring from the front of $string.
The question mark ? matches zero or one of the previous regular expression. It is generally used for matching single characters.
So by using ? as our $substring we instruct bash to match any character at the beginning of the variable and remove it.

Example

$ VAR="Banana";
$ VAR=${VAR#?};
$ echo $VAR;
anana


How to convert ppsx and pps to ppt/pptx/pdf with Microsoft Office 1

Methodologies:

Method A) You can right click on the ppsx/pps file and then click New, this will open a new presentation in PowerPoint with the contents of the ppsx/pps show.
Following, you can modify the document and save it to the desired format.

Method B) You can start the PowerPoint application, go to the File menu and then select Open from the menu on the right, navigate to your ppsx/pps file and open it. After you make your modifications save it to the desired format.

Video Examples

This video demonstrates how to convert a PPSx (PowerPoint show) file to a PDF.

The following video demonstrates how to open a ppsx and a pps file using PowerPoint in a way that you will be able to edit them.