Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
01-23-2010, 03:21 AM
|
#1
|
Member
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81
Rep:
|
escape '*' in case statement bash
Hello,
Does it possible to escape * in the case statement
Code:
case $tst in
- )
echo -
;;
+ )
echo +
;;
: )
echo :
;;
* ) # It should be option, and don't treated like 'any other case'
echo *
;;
= )
echo =
;;
* )
echo Tty -.+,:,*
;;
esac
Thanks
Last edited by junust; 01-23-2010 at 03:22 AM.
|
|
|
01-23-2010, 03:40 AM
|
#2
|
Senior Member
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012
Rep:
|
Quote it. Pick whichever you like best: "*", '*', or \*
|
|
|
01-23-2010, 03:54 AM
|
#3
|
Member
Registered: Jul 2008
Location: Israel Ramat Gan
Distribution: CentOs 5.3, SuSe 11.1, Solaris 9, Slackware 13
Posts: 81
Original Poster
Rep:
|
Thanks, That is it!
|
|
|
All times are GMT -5. The time now is 06:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|