[rhn-users] unary operator expected ??

Jason Connor jconnor at redhat.com
Thu Apr 21 01:47:50 UTC 2005


Alfred is right, the script actually doesn't work. You're testing the
existence of a string when it's quoted with ''. The [] brackets in bourne
and bash are an alternate syntax for the built-in command: test.

Run: man test

and you should bet the information you need to make the cron job work.

-- 
Jason L. Connor
Software Engineer, Red Hat Network
919.754.4013
jconnor at redhat.com

On Tue, 19 Apr 2005, Alfred Hovdestad wrote:

> Hi:
>
> Try removing the files or renaming the directory (mv pub bup) and rerun the
> script.  Make sure it works when the files exist and when the files don't
> exist before you are sure that it works.
>
>     Alfred
>
>
>
> FM wrote:
> > It worked ! thank you !
> >
> > NORMAND Rémy wrote:
> >
> > > Try with a quote ' , and not with the `
> > >
> > >
> > > -----Message d'origine-----
> > > De : rhn-users-bounces at redhat.com [mailto:rhn-users-bounces at redhat.com] De
> > > la part de FM
> > > Envoyé : mardi 19 avril 2005 15:30
> > > À : Mailing List Redhat Network
> > > Objet : [rhn-users] unary operator expected ??
> > >
> > > Hello my crontab is :
> > >
> > > if [ `ls /home/bc_bigfiles/pub` ]; then echo "Files found in server
> > > `hostname`"; fi ;
> > >
> > > in the folder pub :
> > > NBCA_20050418_1.zip  NBQB_20050418_2.zip
> > >
> > > Now I received ths error :
> > > NBCA_20050418_1.zip: unary operator expected
> > >
> > > What does iy mean ? On the web I found some pages talking about unset
> > > variable, which it is not my case, I have none :-)
> > >
> > > Thanks !
>
> _______________________________________________
> rhn-users mailing list
> rhn-users at redhat.com
> https://www.redhat.com/mailman/listinfo/rhn-users
>


More information about the rhn-users mailing list