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

Re: [Sheflug] Scripting backups to cdrom.



And Lo! The Great Prophet "Rob Keeling" uttered these words of wisdom:
>
> My guess is that I need to add an extra print line, which executes once stin
> is closed at the end of the directory listing. How do I do that?
> 

Heh ... silly me to forget that :)

Awk has a special pattern match for things to do at end of input (just as 
BEGIN is things to do right at the start of processing). Thus adding this to
the end of the script ...

## start ... snip from here ...
END {
	 print "mkisofs -JraT -o CDROM" CDCOUNT ".iso " PATHS
}
## end ... snip to here ...

... should do the job.

One thing to note ... I'm still in the habit of using -JraT on mkisofs and 
end up having to change it to -JrT. And some point along the way, the 
mkisofs options changed and later versions don't have -a (include all 
files - it used to exclude "backup" files, that is ones ending in .bak or 
starting with a tilde). I think it includes them regardless in this day and
age :)

Chris...

-- 
\ Chris Johnson           \ NP: Depeche Mode - 04. In Your Room
 \ cej [at] nightwolf.org.uk    ~-----,   
  \ http://cej.nightwolf.org.uk/  ~-----------------------------------, 
   \ Redclaw chat - http://redclaw.org.uk - telnet redclaw.org.uk 2000 \____



___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.