bash script to run a command and take screenshot in every loop.
Couple of days back, I had posted a command to display a stop timer with bash and echo. There I had also put the following gif file:
<img class="size-medium wp-image-2555" title="bash screenshot for the script output" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/09/temp-300x170.gif" alt="bash screenshot for the script output" width="300" height="170" />
Here the tricky part was to capture the jpg’s to create the gif file.
Preparation:
Rename the terminal to aka – amit-capture
Execute the command once with the import command and check the output and jpg’s
Change the font size to 56 or 60 and resize the terminal before executing the command.
To to this I used the import command from the loop command to capture the terminal in every step of the loop.
Here is the full command:
1
2 3 4 5 6 7 |
For execution, just use history, it might be very difficult to type the full command again with small terminal and big fonts 🙂
Related articles by Zemanta
- Guides: Shell Scripting For Beginners (brighthub.com)
- for loop in bash script on solaris without seq (amit-agarwal.co.in)
- Do You Understand Job Control in Bash? (symkat.com)
- RVM and cron in production (scoutapp.com)
Related Articles:
- 2010/09/01 Use the last command\’s output as input to a command without piping and bind to it to a key sequence in bash.
- 2010/09/21 bash – echo command with option to display the output on the same line.
- 2010/09/04 Remove some path from the PATH variable temporarily.
- 2010/08/13 tee to a file descriptor
- 2010/06/25 Magic space on the current command line
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.