Networker

Re: [Networker] mmlocate script assistance

2007-06-27 12:56:48
Subject: Re: [Networker] mmlocate script assistance
From: Darren Dunham <ddunham AT TAOS DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Wed, 27 Jun 2007 09:54:05 -0700
> #!/bin/bash 
>  
> newloc="'Some New Location'" 

Those single quotes are not special.

loc="'Some New Location'"
perl -le 'foreach (@ARGV) {print "->$_<-"}' $loc
->'Some<-
->New<-
->Location'<-

> sudo /usr/sbin/nsr/mmlocate -u -n ourbackup1.001 $newloc 

So the complaint is that you're feeding it 3 locations instead of one.

Try instead:

newloc='Some New Location'
mmlocate <blah .. blahs...> "$newloc"

perl -le 'foreach (@ARGV) {print "->$_<-"}' "$loc"
->Some New Location<-

-- 
Darren Dunham                                           ddunham AT taos DOT com
Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER

<Prev in Thread] Current Thread [Next in Thread>