Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


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

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


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, 02:47 AM   #2
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
`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)


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

All times are GMT -5. The time now is 02:20 PM.

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