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:
Here the tricky part was to capture the jpg\’s to create the gif file.
1. Rename the terminal to aka – amit-capture
2. Execute the command once with the import command and check the output and jpg\’s
3. 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:
for i in `seq 100 -1 90`
echo -ne "$i \\r"
sleep 1; import -window "aka - amit-capture" -resize 50% $i.jpg
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)