August 2012

Linux / Unix - cut command

The cut command helps to cut the selected position/fields from given input/input file.

It have various options
-b - To cut from selected position. To start cut from given byte.
-f - To cut the given field.
-d - used for delimiter
-c - To cut the characters from given character position.

Examples:
Extract the character positions

$date
Tue Aug 14 16:58:43 EST 2012

$ date | cut -c1-3
Tue

$ date | cut -c5-7
Aug

$ date | cut -c1,2
Tu

Extact the specified fields
$ date | cut -f1,3 -d " "
Tue 14

$date | cut -f1-3 -d " "
Tue Aug 14

Extract the specified bytes
$ date | cut -b1-3
Tue

$ date | cut -b1,3
Te

htmldoc : Convert Html file to PDF

htmldoc helps to convert the hyper-text markup language files and webpages to PDF, postscript files.

How to use this in Unix / Linux

1. Download htmldoc and install it in unix / linux system.
2. Get ready with input html / web page file
3. Use command
htmldoc/bin/htmldoc_path --landscape --top --right 0 left 7mm --bottom --fontsize 10.0 --webpage -f outputfilename inputfilename

To use this in perl running in linux / unix box

Just pass on parameters and execute this command using system command in perl

You can download this from htmldoc.org

WinSCP

WinSCP is free sftp client / scp client / ftp client for windows. It helps to transfer files between local and remote servers. The remote server can be window or linux or unix box.

Its main advantage is :

* It have explorer
* Windows like drag and drop options
* one side local and other side remote computer file manager
* If required stored the session information
* Integrated text editor
* Can perform all common operations with files.

You can download from winscp.net/eng/download.php