I have many rar archives structured in separate folders and would like the script to unzip them all.
I am having trouble figuring out how this should be done and you need help.
#!/bin/bash ## For all inodes for i in pwd; do ## If it a directory if [ -d "$i" ] then cd $i ## Find ".rar" file for [f in *.rar]; do ./bin/unrar x "$f" # Run unrar command on filename cd .. done done done
I am not familiar with the bash script, and I assume the code is wrong more than once. But I guess this should be the main structure
linux bash
Linuxxon
source share