Monthly Archives: March 2014

Bash Scripting Basics (Variable Assignment, If, Loop)

12345678910111213141516171819202122232425262728293031#!/bin/bash ################################################## # Benchmark the processing time when wkhtmltopdf # converts an html file to a pdf file ################################################## if [[ $1 = "" || $2 = "" || $3 = "" ]]; then         echo "Usage: … Continue reading

Posted in Bash, Linux | Leave a comment

Compress and Extract Files in Linux

Extract: .tar.bz2 To extract a tar (Tape ARchiver) file, type the following in the shell prompt: 1tar xvjf yourFileName.tar.bz2 Which will untar it to the current directory. Depending on the file structure that being compressed, it might create sub-directories. Parameters: … Continue reading

Posted in Bash, Linux | Tagged | Leave a comment