Comments (16)
we'll need more details - how about platform/OS/shell? and how you are running it?
from unrarall.
I am running a variant of archlinux off of a USB stick on a Zyxel NSA320 nas box. It's running bash 4 and I changed the top of the script to the directory location of my bash which is /ffp/bin/bash
from unrarall.
I believe version 2.6.31.8
from unrarall.
And have you made sure to change which shell this is being executed under in the shebang instead of - I'm guessing - busybox? Also what's the exact command you're running?
from unrarall.
this looks like a typical issue with a reduced shell like busybox sh
from unrarall.
Ah I'm not too familiar with linux, what should I be checking? It does seem that I have busybox on the machine though. I just checked that.
from unrarall.
change the first line of the script https://github.com/arfoll/unrarall/blob/master/unrarall#L1 to be #!/ffp/bin/bash
from unrarall.
ah yes I did that. and still ran into the same issue.
from unrarall.
How are you executing unrarall? The full command line with all parameters
from unrarall.
Actually interestingly bash may not technically support function names with a hyphen @delcypher you ever heard of that? (http://stackoverflow.com/questions/28114999/what-are-the-rules-for-valid-identifiers-e-g-functions-vars-etc-in-bash)
@josephbisaillon try maybe renaming clean-up
to cleanup
and see if that works for you
from unrarall.
I did that earlier and it ran a little more then broke at the next function with a dash. BUT you did just make me think making running it with /ffp/bin/bash unrarall --verbose --dry would work..AND it looks like it's working! I'm not sure if that would be the proper line to run. I am trying to extract files, if they are already extracted bypass and delete original rars. if not extract and THEn delete original rars.
from unrarall.
--dry will do nothing, we extract even if stuff is 'already extracted' because checking and making sure is rather difficult. What bash version are you using? It's weird because my nas runs arch linux and I've not seen the issue :/
from unrarall.
Bash 4.1.11(2) -release
But I wouldn't put it past my system being a little funky. I've done a lot of horrible things to this poor nas box because it was my first real linux experience haha. Thanks for all the help though it seems to be working!
from unrarall.
Actually interestingly bash may not technically support function names with a hyphen @delcypher you ever heard of that? (http://stackoverflow.com/questions/28114999/what-are-the-rules-for-valid-identifiers-e-g-functions-vars-etc-in-bash)
No but the docs probably aren't lying. Using -
as a separator was a bad idea on my part. We should replace them with _
instead.
from unrarall.
Don't know if this will help or if you want to try to implement something like this. But this is the script that I use to extract all rar recursively in a directory. It works pretty well and ignores files that have already been extracted.
from unrarall.
# WHAT THIS DOES:
# The below script will extract each rar file into its current directory (the rars will make whatever subdirectories they need to make - which ever ones they contain of course).
# WHAT TO DO:
# 1. fill out SOURCE variable (thats where all of the rars are, well they dont necesarry have to be on the same folder level, they could be a few folders deep, but this will be the root of the operation)
# 2. pick whichever OVERWRITE option you want
# 3. copy paste the script into the shell (the parenthesis on the outsides of the script make sure it all runs nicely together)
# MORE INFO ON OVERWRITE VARIABLE:
# the overwrite variable, pick either -o+ for overwrite, -o- for not overwrite, or empty " " for prompts on overwrite. Make sure to hash out the ones you dont want. I like overwrite because then I ensure a good clean copy.
(SOURCE='/i-data/video/Downloads/DLtoNAS'
# OVERWRITE="-o+"
OVERWRITE="-o-"
cd $SOURCE
OLDIFS=$IFS
IFS=$'\n'
for i in `find -type f | grep rar$`; do
echo "### --------[`date +%D-%T`][`date +%s`]--------";
FILEFULLPATH=`readlink -f $i`;
FULLDIR=`dirname $FILEFULLPATH`;
echo "### EXTRACTING ${i} TO ${FULLDIR}:"
echo "### unrar x $OVERWRITE ${i} ${FULLDIR}"
unrar x $OVERWRITE "${i}" "${FULLDIR}";
done;
IFS=$OLDIFS)
from unrarall.
Related Issues (20)
- Corrupt File or wrong password Error HOT 2
- unrarall cleans files if subs rar has extracted cleanly HOT 6
- FR: Move subtitle files to main dir HOT 2
- Mac sed, the special snowflake... HOT 3
- Clobbering files on extraction and skipping already extracted files HOT 1
- extraction fails if source folder name has spaces HOT 5
- wishlist HOT 1
- provide example usage in readme.md HOT 2
- [BASH 3] Relative path gives error message about UNRARALL_OUTPUT_DIR not being a directory HOT 4
- Egrep style regular expressions break finding rar files in certain cases. HOT 1
- Valid rar file invalid mime type HOT 2
- .r00 files not found HOT 1
- Does not obey --skip-if-exists. HOT 2
- Feature request: Option to rename output file to parent directory HOT 1
- Allow 7zip to extract .ISO Files
- Only 1 working HOT 1
- Extracting files into a path named after the file
- Get error at unrar
- Unnrar from subfolders and rename extracted file to parent folder name HOT 1
- .zip support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unrarall.