To save a command output to image we can use convert command.
By default convert command is not available in Ubuntu.
convert command is available in imagemagick module.
Install imagemagick with following command:
$ sudo apt-get install imagemagick
Above command is specific to Debian/Ubuntu operating systems. Depending on your operating system the may vary.
Here is the example to convert a command output to image.
Syntax:
$ command | convert label:@- output.png
In above syntax command is any valid command and output.png is output image name to store command output.
Example:
$ ls | convert label:@- ls.png
In above example ls command output is stored in ls.png
-Sany