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

Re: Copy all except one



john wrote:
> 
> In local.debian.user, you wrote:
> > debpc:/# if [-d bin]; then; echo "yes"; fi;
> > i get:
> >   bash: syntax error near unexpected token ';'
> >
> > Why? I've tried various ways to fix it.
> 
> Take out the ; after 'then'.

That did it! (as well as putting spaces around the
brackets as another poster said)

I got confused because this works
in a script:

  if [ -d bin ]
  then           <-
    echo "Yes"   <- new line
  fi



Reply to: