Symfony doctrine migrations up and down

Problem

You would like to run a migration in a symfony 2x project either up or down.

Solution

You can run the following for getting a migration up or down:

Removing empty lines from text/csv file with awk in linux

Problem

You have a text file that has empty lines, and you would like to remove them.

Solution

You can use awk in linux like the following to create a new file with the empty lines removed: