LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-03-2008, 01:27 AM   #1
muazfarooqaslam
LQ Newbie
 
Registered: Dec 2007
Posts: 22

Rep: Reputation: 15
What is use of backtick ` character in scripting


Hi,

Can somebody please share the use of backtick character ` in shell scripting? I have seen this character being used widely in shell scripting but i dont know its main purpose.
 
Old 01-03-2008, 01:47 AM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
`command` is the same as $(command)
bash executes command and substitues the output for the expression.
Try this

ls -l `which xterm`
ls -l $(which xterm)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
sh scripting -- escape * character? Brender Linux - Newbie 2 10-12-2007 09:33 AM
Bash: When to use backtick and when to use $(). unreal128 Programming 4 10-08-2006 02:05 AM
about wide character and multiple byte character George2 Programming 5 05-23-2006 01:03 AM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 04:29 AM
Bash scripting - add a character to a line. welby Programming 1 01-14-2004 10:09 AM


All times are GMT -5. The time now is 12:07 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration