Ruby code – update

Hmmmm, it looks like my estimate (https://nhw.pl/wp/2006/04/compact-ruby-code/) was wrong.


wc -l rbckp.rb
44 rbckp.rb

or even more interesting:

grep -v ^$ rbckp.rb |wc -l
34
grep -v ^$ BACKUP.sh | wc -l
103

For those not familiar with grep syntax – using -v ^$ filters and shows all not empty lines (for such query line with whitespaces only is not empty).

And basically both scripts does similar work (even if not identical). I like Ruby…

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.