bug-bash
[Top][All Lists]
Advanced

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

Re: variable and special chars problem


From: Bob Proulx
Subject: Re: variable and special chars problem
Date: Wed, 26 Sep 2007 13:10:50 -0600
User-agent: Mutt/1.5.9i

_Biff wrote:
> I am having an issue figuring out how to input a value that has special
> chars and using that var as follows:
> input value(no quotes):
> name:phone
> Script:
> " location='${USERINFO}' "

The quotes are part of the actual script?  That does not make sense in
that particular context.  Please state the actual snippet being
executed.

> USERINFO doesnt seem to be formatted correctly due to the ":" in the input
> value.  any ideas?

Works for me.  Try this bit of code that I tested:

  #!/bin/bash
  USERINFO=name:phone
  echo "location=${USERINFO}"
  location=${USERINFO}
  echo $location
  exit 0

That produces:

  location=name:phone
  name:phone

Please be sure to keep the mailing list in the reply so that others
can participate in the discussion.

Bob




reply via email to

[Prev in Thread] Current Thread [Next in Thread]