0

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.

1 Answer 1

1

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
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .