1. File randomizer
This project came to my mind when I was trying to burn some music for my car. The car did not have the ability to shuffle play so I decided to randomize the file order. But the default burning tool did not have an option to shuffle files before burning, so I decided to make this small script. This is the full script:
#!/bin/bash
num_files=$(ls | wc -l)
pad=$(echo "l($num_files)/l(10) + 1" | bc -l)
pad=${pad%.*}
counter=0
ls -A | shuf | while read filename; do num=$(printf "%0${pad}d" $counter); mv "$filename" "$num - $filename"; counter=$(($counter+1)); done;
1. funny terminal
The fortune | cowsay is quite known. But to spice things up, use
lolcat
- Other things quite famous are figlet and toilet
Espeak
is a text-to-speech programe
nyancat
(gif)
vtop
is another nice command (install via npm) This uses braille characters to make the plot!
cmatrix
- Install
sl
, so when you misspel ls, you get this: (gif)
- Install
filters
to have
- easy terminal
- remove empty directories
find -type d -empty -exec rm {} \; # remove empty directories
- convert bases to other bases
echo "obase=16;ibase=10;500000" | bc
- find the years in which 21 november is a friday
for y in {1970..2010} ; do date -d $y-11-21 +%u-%Y ; done | grep -P "(?<=5-).*"
- find out how many files sit in a directory
ls -l | wc -l
- get a list of the ASCII files in the directory
file * | grep ASCII | awk -F: {'print $1'}
- create a hexdump
cat file | hexdump -c