Twitter http://twitter.com/ebalaskas/
Blog http://ebalaskas.gr/blog
Website http://ebalaskas.gr/

0 score

Rename all files in a directory to upper case

 $ for i in *; do mv "$i" "${i^^}"; done

April 20, 2013, 9:53 p.m.EvaggelosBalaskas

5 score

Rename all items in a directory to lower case

 $ for i in *; do mv "$i" "${i,,}"; done

April 20, 2013, 9:41 p.m.EvaggelosBalaskas

3 score

Remove offending key from known_hosts file with one swift move

 $ sed -i 18d .ssh/known_hosts

Jan. 16, 2013, 2:29 p.m.EvaggelosBalaskas

0 score

How to expand a CIDR notation to its IPs

 $ for j in $(seq 0 255); do for i in $(seq 0 255) ; do seq -f "10.$j.$i.%g" 0 255; done; done

Jan. 16, 2013, 11:53 a.m.EvaggelosBalaskas