-
joining all hjsplit files in a folder on mac
Hi
Before you read any further, this is for joining hjsplit files on mac os x only, and you need to run it from the terminal.
Not sure if this is any use to anyone, but I used to use hjsplit and click on each file one by one, but bored one night i wrote a script to run round my download folder, get all hjsplit files, join them and delete the hjsplit files.
YYMV, and obviously if it deletes your hard drive, sets fire to your house, or kills your dog, i take no responsibility...
Copy this into a file in your download folder (e.g. catall.sh), make it executable (chmod 777 catall.sh), then after a night of downloading, just run ./catall.sh and it will take care of all your files.
There's probably a much neater and more sophisticated way of doing this, but this works for me. :-)
HTH.
catall.sh - don't copy this line :-)
shopt -s nullglob
for f1 in *.0??
do
new=`echo "$f1" | sed 's/ /_/g'`
mv "$f1" "$new"
done
for f in *.001
do
name=${f%\.*}
cat ${name}* > tmpfile
mv tmpfile "$name"
rm ${name}.0??
echo "$name hjsplit files concatenated and deleted"
echo " "
done
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
BACK BY POPULAR DEMAND!
Sign up for a Platinum account with Pay PAL
JOIN NOW
Please note: Once payment is made you need to send a private message to wicked at the forum, stating your username and the email address you used to pay.
If you do not do this your upgrade will be delayed, the upgrade will be done within 12 hrs.
Payments are made via websoftff.com
Close