Re: awk vs. cut

Tristan Rhodes <[email protected]> Fri, 08 Oct 2004 08:12:11 -0600
Newsgroups gmane.comp.sysutils.backup.sarab
Message-ID <[email protected]>
Thanks Alfred,

I will look into using the single quotes on Awk.  As for your second suggestion, that is fixed in 
the next version of SaraB.  I am now using the correct integer comparison ( -eq ) instead of string 
comparison.

Thanks for looking into the problems and sending your suggestions.  I love when users do that!

As an update on SaraB, I am working on the next version which will probably be 0.3.0.  As a teaser, 
it has support for data redundancy via Parchive and an RPM install!

Cheers,

Tristan Rhodes

Alfredo Tripicchio @ Pointel wrote:
> Hi List,
> 
> I tried the patched version of sarab.sh, but still had problems with 
> awk, until I changed the double quotes in single quotes, that is:
> CURRENT_ARCHIVE=$(echo $CURRENT_LINE | awk '{print $1}')
> instead of
> CURRENT_ARCHIVE=$(echo $CURRENT_LINE | awk "{print $1}")
> and so on for the other occurrences of awk.
> 
> I also had to delete the double quotes from $NUM_FIELDS, that is
> if [ $NUM_FIELDS = "2" ]; then
> instead of
> if [ "$NUM_FIELDS" = "2" ]; then
> 
> After these modifications the script was able to split the lines of 
> rotation.schedule and create incremental/differential backups when needed.
> 
> Hope this helps.
> Regards,
> Alfredo Tripicchio


-- 
This message has been scanned for viruses and dangerous
content by MailScanner, and is believed to be clean.



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl