I've managed a few very basic scripts to do thing over the years but honestly each time I have to relearn the little I know. If someone could help, and by help I mean do, I'd appreciate it.
I'd like to right click on a folder.
have that folder archived to a single RAR file, with a randomly generated name (date | md5sum) for instance, a password added (hardcoded in the script so it's the same each time) then the pars created (10% redundancy).
Also the resultant files should be in the selected folder rather than the parent folder and preferably placed in a subfolder named I RARPAR
select with right click folder JAMES in parent /home/bob/documents
script would create results in
I Know I'm asking a lot but I simply cannot fathom right now how to do this and my honeydo list this Saturday is huge an I have to run off and take care of it.
Thanks in advance
Not elegant but it works.
this 1. rares the selected files 2. creates a folder named "rarred" and moves the book.rar file there and changes to that directory. 3. renames the book.rar to a random 26 character alphanumeric. 4. Creates par2 files with 10% redundancyrar a -p[smeg] -r10 book.rar
mv book.rar rarred
for fname in *.rar
mv $fname 'abook - '"$(pwgen 26 1).rar"
par2 c -r10 *.rar