This one has me stumped :-/

I have a non-rooted nexus 7 (2013, Android 4.4.2). There is a directory on the inbuilt sd card and this directory has about 200 files in and I would like to rename each file in this directory to what you would get if you rot13 the file!

$ for i in * ; do j=`echo $i | rot13`; mv "$i" "$j"; done

would do it on a unix machine with rot13 installed. I have Android Terminal Emulator and BusyBox Non-Root installed but unfortunately neither seem to have a rot13 command.


Not really an Android question (rather Linux/Shell/Bash), but I give the credit of the missing executable. So:

for i in * ; do j=`echo $i | tr '[a-m][n-z][A-M][N-Z]' '[n-z][a-m][N-Z][A-M]'`; mv "$i" "$j"; done

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.