The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
whacky email idea [MA]Flying_Meat OS X (Apple) 1 03-23-2004 09:35 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-14-2005
Registered User
 

Join Date: Sep 2002
Location: San Fran
Posts: 105
whacky punctuation dealies

Say I have a command that looks like this:
host=$(/usr/bin/host xxx.xxx.xxx.xxx)

What is the significance of the $()
I know what happens when I don't include them, and I know what happens when I do, but...
Why doo it woik wit $()

Sorry for the lame question
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-14-2005
vgersh99's Avatar
Moderator
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 2,999
do 'man ksh' and search for 'Command Substitution'
Reply With Quote
  #3 (permalink)  
Old 06-14-2005
reborg's Avatar
Administrator
 
Join Date: Mar 2005
Location: Ireland
Posts: 3,503
Quote:
Originally Posted by vgersh99
do 'man ksh' and search for 'Command Substitution'
or 'man bash' if you are using bash, and don't have ksh, and search for the same thing.
Reply With Quote
  #4 (permalink)  
Old 06-14-2005
Registered User
 

Join Date: Sep 2002
Location: San Fran
Posts: 105
D'OH!

Thanks for the quick responses. I was aware of the backquote method (aka "old-style") and didn't think to check the man page.

That'll larn me.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:04 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0