List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:May 5 1999 11:00pm
Subject:Re: [MySQL]$editor : not found, YET! :)
View as plain text  
Marcos, there are two mistakes in what you typed.

> % sh
> $ which vi
> /usr/bin/vi

So far we are okay.  The next line has the mistakes.

> $ $EDITOR="which vi" mysql -e 'select 1 ass foo\e'

First, you should not put the dollar sign in front of
EDITOR.  It should be EDITOR=, not $EDITOR=.  In the shell,
you set a variable by giving a name, directly followed by
an equal sign (no spaces are allowed), directly followed by
a value (again, no spaces).  To get the value of a variable,
you give the dollar sign directly followed by the name of
the variable.

So what you did above was request the value of the EDITOR
variable, concatenate that value with the string '="which vi"',
and then try to run the result as a command.  It is not a
surprise that the resulting command could not be found!

The second mistake was using double quotes instead of back-
quotes.  A back quote is not a single quote.  On my keyboard
it is found on the same key as the tilde (~), but it might
be somewhere else for you.  It looks like a single quote, but
it is slanting from top-left to bottom-right (`).

> /usr/bin/vi=which vi: not found
> $ exit 

Marcos, I think the problem is with getting used to how the
Unix shell works.  If you want more help with this let me
know, but probably we should leave it off the list.  If anyone
else on the list is having similar problems, let me know and
I can send you whatever solution we come up with.

Tim


On Wed, May 05, 1999 at 10:54:35PM +0100, Marco Lopez wrote:
> Hi again Tim:)
> 
> It seems you sent me double quotes around 'which vi' when giving 
> value to the variable. So sorry, but it apperars that Pegasus Mail for 
> win treats double quotes as single, and consequently I saw single 
> quotes.
> 
> I know they were double quotes by at least 2 helpful guys (thanks 
> Fred & Fredrik!) that told me so :)
> 
> Anyway, as you can see, there is little difference with previous 
> results...
> 
> % sh
> $ which vi
> /usr/bin/vi
> $ $EDITOR="which vi" mysql -e 'select 1 ass foo\e'
> /usr/bin/vi=which vi: not found
> $ exit 
> 
> > On Mon, May 03, 1999 at 11:36:16PM +0100, Marco Lopez wrote:
> > > I should have written this in the first place: :) I'm using
> > > BSDI, vi works from the shell and so does pico, but NOT form
> > > inside mySQL.
> > 
> > Marco, could you please try the following, and the cut and paste
> > the *exact* commands and output?  I would like to see something
> > that looks very similar to the following:
> > 
> > % sh
> > $ which vi
> > /usr/bin/vi
> > $ EDITOR=`which vi` mysql -e 'select 1 as foo\e'
> > <... here you should go into a vi session - just quit ...>
> > +-----+
> > | foo |
> > +-----+
> > |   1 |
> > +-----+
> > $ exit
> > %
> > 
> > If it doesn't work for you, hopefully the ouput that you do get
> > will help us find the problem.
> > 
> > Tim
Thread
Re: [MySQL]$editor : not found, YET! :)Marco Lopez4 May
  • Re: [MySQL]$editor : not found, YET! :)Thimble Smith5 May
    • Re: [MySQL]$editor : not found, YET! :)Marco Lopez5 May
    • Re: [MySQL]$editor : not found, YET! :)Marco Lopez6 May
      • Re: [MySQL]$editor : not found, YET! :)Thimble Smith6 May
  • Re: [MySQL]$editor : not found, YET! :)Jens Ellegiers5 May
    • Re: [MySQL]$editor : not found, YET! :)Paul DuBois5 May
  • Re: [MySQL]$editor : not found, YET! :)Christian Mack5 May
  • Re: [MySQL]$editor : not found, YET! :)Fred Read6 May