Thanks
DarthWavy wrote:
Yo,
I'm not familiar with rar and it's not clear how you intend to use the filename. It kinda looks like you need some filename info for the passwd switch.
Let's start with this, you may be able to adjust it suitably;
Code:
#!/bin/bash
cd /home/username/
ls *.iso | while read ifile
do
rar a -k -m5 -ppassword '[ubuntu] - 0001.rar' "$ifile"
done
This may include the useless use of 'ls'...
DW
hi Darth Wavy thanks for the reply is it okay if I ask what the below line of code does?
Code:
ls *.iso | while read ifile
I think there will be some issue as all archived file will have this name "[ubuntu] - 0001.rar" correct? wherein every loop it will be overwritten
Can you shed some light how to rar the files and name them based on their original name?