Archive

Posts Tagged ‘convert’

How to obtain an X screenshoot from the terminal.

July 28th, 2010 gg1 No comments

Sometimes I need to get some screenshoots while I'm running live CD's without screenshoots applications, I solved this problem using the xwd command:

In a terminal window or in a virtual console you can run the following command:

# xwd -root > screenshoot.xwd

How to convert img files to iso files

May 10th, 2009 gg1 No comments

This script allows you to convert from img files to iso files. To work it needs two standard commands included in most of Linux distribution:

dos2unix using sed – How to remove ^M chars from a DOS file

April 9th, 2009 gg1 No comments

After dos2unix using vim, here is dos2unix using sed

 

in bash you could type the following command:

# sed 's/^M$//' input.txt > output.txt

or  you can convert UNIX to DOS by typing the following command:

# sed 's/$'"/`echo \\\r`/" input.txt > output.txt

Categories: Bash Tip & Tricks, linux Tags: , ,