On Fri, Jun 11, 2010 at 10:04 AM, Jerry Geis <ge...@pagestation.com> wrote: > Hi all, > > > in a script if I have: > VERSION="3.2.0" > > I can do: > echo jj-$VERSION-jj > and get jj-3.2.0-jj > > however if I do: > echo jj_$VERSION_jj > I get jj_ > > How do I get the $VERSION to work with the underscores like the dashes do.
I see 4 ways: echo jj_${VERSION}_jj echo jj_"$VERSION"_jj echo jj-$VERSION-jj | tr '-' '_' printf jj_%s_jj $VERSION I am sure there are others. HTH, -Bob _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos