creating variables

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nathan England
Date:  
Subject: creating variables
You know, I have always just thought that was the font I was using and it was
a single quote!! '

lol, I'm glad I asked this anyway! that helps with a lot of things I'm trying
to do!!

nathan

On Friday 30 August 2002 11:23 am, Matt Alexander wrote:
> VARIABLE=`ls /var/log/packages | grep mysql`
>
> (note the use of backticks which run the command in a subshell and return
> the result which is stored in $VARIABLE)
> ~M
>
> On Fri, 30 Aug 2002, Nathan England wrote:
> > I want to search a directory for a file name and throw it into a
> > variable. Such as:
> >
> > /var/log/packages/mysql-3.23.51-i386-1
> >
> > I want to type in just mysql and have it create a variable for
> > mysql-3.23.51-i386-1
> >
> > I was trying
> > ls /var/log/packages | grep mysql
> > but from there don't know how to get it into a variable
> >
> > And
> > VARIABLE='ls /var/log/packages | grep mysql'
> > doesn't work either.
> >
> > I have a script that searches for whatever I tell it.
> >
> > myscript something
> >
> > Something is a variable, but I type in a partial name, like mysql and it
> > searches and prints the full name in the variable which would be $1 or $2
> > or $3 whatever...
> >
> > How do I accomplish this in bash?
> >
> > nathan
> >
> > -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> > PLUG-discuss mailing list -
> > To subscribe, unsubscribe, or to change you mail settings:
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Circuits Computer Services
716 N Beeline Hwy
Payson, Arizona 85541


Circuits Computer does the best of its ability to provide
technical support, however due to the rapid growth & change
in technology - we cannot accept responsibilty for errors and
malfunctions beyond our control.