Tag Archives: bash

Generate random filenames via bash

I have a bunch of jpegs that I need to sort randomly for a slideshow. In bash a random number is generated everytime the $RANDOM variable is called, so… $ for i in ../*.jpg;do cp -v “$i” “${RANDOM}.jpg” -v;done Note the “../*.jpg”, which just means I’m getting the files from a different (in this case [...]

Posted in HowTo, Tech, Unix One-Liners | Also tagged , | Leave a comment

Handy one-liners for SED

Shamelessly copied from http://www-h.eng.cam.ac.uk/help/tpl/unix/sed.html. I just want to immortalize this here because I use sed a lot. HANDY ONE-LINERS FOR SED (Unix stream editor) Mar. 23, 2001 compiled by Eric Pement <pemente@northpark.edu> version 5.1 Latest version of this file is usually at: http://www.student.northpark.edu/pemente/sed/sed1line.txt http://www.cornerstonemag.com/sed/sed1line.txt This file is also available in Portuguese at: http://www.lrv.ufsc.br/wmaker/sed_ptBR.html FILE SPACING: [...]

Posted in Unix One-Liners | Also tagged , | 1 Comment

Why you don't need HJSplit for Linux

HJSplit is famous in the DOS/Windows world as a way to split/join large files for easy network transfer. I’m just confused why they bothered to make an HJSplit version for linux. This HJSplit for Linux even requires you to install a separate library which add to the garbage for such a useless app (for nix). [...]

Posted in Unix One-Liners | Also tagged , , , | 39 Comments