[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RAR; the command line version



From: bentley rhodes <bntly_rhds@charter.net>
> does anyone use rar for the command prompt?  i really like it, but 
> i was wondering if anyone knew the command or switch to have it put 
> each directory into its own file.  If you use wine and winrar, there 
> is an option to do that.

Well, you can always bash it ...

  for i in .; do [ -d "$i" ] && rar (options) $i.rar $i; done

That will test each entry in the current directory if it is a subdirectory, and
if so, create a .rar of each subdirectory.

Note, for this to work, noglob must be off (default).
If noglob is on (use "set -o" to verify), then replace:  
  for i in .; do
With:
  for i in `ls .`; do



--
Bryan J. Smith   mailto:b.j.smith@ieee.org


-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.