I having a hard time trying to create a simple bash script that would recursively go through all directories in my Downloads folder, and unrar.
Its quite a simple script, but for some reason I keep running into a dead end. At the moment, I'm trying this:
- Code: Select all
for x in */*.rar; do unrar x $x; done
However this doesnt work as */*.rar returns jibberish. If I simply replace it with *.rar it works fine, but this only applies to the current directory and not any subdirectories.
Can anyone shed a light onto what I'm doing wrong?
Thanks



