TOP 10 Most not useful BASH scripts 1. There is one inspirational book, it is called 10 PRINT CHR$(205.5+RND(1)); : GOTO 10. Its name in BASH can be written like this:
while true; do printf \\$(printf '%o' $[47+45*(RANDOM%2)]); donewhile true; do printf \\$(printf '%o' $[45+79*(RANDOM%2)]); done while true; do printf \\$(printf '%o' $[123+(RANDOM%4)]); done 2. In modern days, some of us can missing analog TV noise, this one-liner will make similar effect in your terminal:
P=(' ' █ ░ ▒ ▓);while :;do printf
"\e[$[RANDOM%LINES+1];$[RANDOM%COLUMNS+1]f${P[$RANDOM%5]}";done
3. Knight rider effect for terminal window title:
4. Every Installfest provided by Silicon Hill we've put some strange
code on T-shirts. I sent my suggestion but it was not chosen because
other geeks found it too weird:
A=(105557416050692 77176372792420 111263447882950 111089501671460 111298948435175)
A+=(140745122766848 140746759356416 140738707374080 140739778977792 140754249564160)
for i in ${A[@]};do echo "obase=2;ibase=10;$i"|bc;done|sed -e 's/1/ /;s/0/ /g;6i\ '
Yes, is not obvious what it is doing on first sight and reminds me
year when
10. Utility dialog is used for textual widgets, if you need get
some free-time use following command:
for i in {0..100}; do echo $i | dialog --gauge "Upgrade in progess" 10 70 0; sleep 1; done
Don't forget to prolong sleep constant!