LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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


Reply
  Search this Thread
Old 05-29-2012, 08:37 AM   #1
sandeep.kaniyampady
LQ Newbie
 
Registered: May 2012
Posts: 3

Rep: Reputation: Disabled
How to escape [ ] in tcsh?


I executing the following code in tcsh

$ set my = 'abc[def]ghi'
$ echo $my

Output I got is
$ echo: No match

I am expecting an output as follows
$ abc[def]ghi

Please help me out.
 
Old 05-29-2012, 08:40 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
echo "$my"
 
1 members found this post helpful.
Old 05-29-2012, 09:17 AM   #3
sandeep.kaniyampady
LQ Newbie
 
Registered: May 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank you.
It worked
 
Old 05-29-2012, 12:54 PM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
see how quotation works in tcsh to understand what's happening






_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
 
Old 05-29-2012, 02:19 PM   #5
sandeep.kaniyampady
LQ Newbie
 
Registered: May 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
see how quotation works in tcsh to understand what's happening






_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as SOLVED
(located in the "thread tools")
Where can I find the documents for tcsh scripting. I am a novice
 
Old 05-30-2012, 12:42 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,848

Rep: Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309Reputation: 7309
about quotations look for lexical structure here: man tcsh
here are some other links:
http://faculty.plattsburgh.edu/jan.p.../help/tcsh.htm
http://www-xray.ast.cam.ac.uk/~jss/l...out/scripting/
https://supportweb.cs.bham.ac.uk/doc...scripting.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tcsh problem suChris Slackware 2 04-14-2010 01:42 PM
I've lost my tcsh! ultimo_boulevard Programming 4 09-28-2005 08:35 AM
bash or tcsh infected Linux - General 2 06-17-2003 12:17 PM
tcsh problems ezrollers Linux - Software 3 06-03-2003 08:41 AM
tcsh hhegab Linux - Newbie 1 07-30-2002 05:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration