whacky punctuation dealies


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting whacky punctuation dealies
# 1  
Old 06-14-2005
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 Smilie
# 2  
Old 06-14-2005
do 'man ksh' and search for 'Command Substitution'
# 3  
Old 06-14-2005
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.
# 4  
Old 06-14-2005
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. Smilie

That'll larn me.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Adding text from a variable using sed (Or awk) with punctuation

Hi All, I would have though this would have been simple, but... I have text in a variable that I need to insert into a bunch of other files... The text is simple: ... (2 Replies)
Discussion started by: joeg1484
2 Replies

2. Shell Programming and Scripting

PHP Labeling/Punctuation Syntax Question

Greetings! My first PHP question; and, no doubt, a "no-brainer" for the initiated :) The question centers around the proper syntax for input field labeling. The snippet which puzzles me (and the candidate which I wish to modify) goes like this:<?php _e('Hello World'); ?>:<br />What I'd like... (0 Replies)
Discussion started by: LinQ
0 Replies

3. Shell Programming and Scripting

Replacing punctuation marks with the help of sed

#!/bin/bash a=(*.pdf) punct=((~`!@#$%^&*()_-+=|\{};':",./<>?)) for (( i =0; i < ${#a}; i++ )) do sed -ri 's/$punct//g' ${a} done I cannot use the above code, can you help me in removing all punctuation marks from file name except file extension. The idea is that once all... (9 Replies)
Discussion started by: ambijat
9 Replies

4. Shell Programming and Scripting

grep ignoring punctuation

I have a file xxx.txt containing winter_kool sugar_"sweet" Is there anyway i can grep xxx.txt for strings without using punctuations. for eg: `grep sugarsweet xxx.txt` should give output : sugar_"sweet" (2 Replies)
Discussion started by: jack_gb
2 Replies

5. UNIX for Dummies Questions & Answers

Problems with deleting punctuation and apostrophes

Dear All, I have a file which I want to get the list of frequency of each word, ignoring list of stop words and now I have problems which punctuations and " 's ". what I am doing is: sed 's///g' file01.txt > file01-clear.txt cat file01-clear.txt | tr "" ""| tr ' ' '\012' |sort |uniq -c... (3 Replies)
Discussion started by: A-V
3 Replies

6. What is on Your Mind?

Names/nicknames for certain punctuation

I know that forward slash and backslash are "whack" and "backwhack," and I know that a pound-sign or number sign is "crunch" and an exclamation point, "bang." What I would like to know is whether or not there's a popular nickname for the dollar sign. I call it "cash," but that may just be Yank... (6 Replies)
Discussion started by: SilversleevesX
6 Replies

7. OS X (Apple)

whacky email idea

Here's an idea i've been toying with: I'd like to use the mail storage on my home machine (Apple's mail client mbox's) via an X client. I'd like to ssh -X and then fire up an X client for reading/sending mail while I'm away from my home machine. The advantage is that, I have all my mail (both... (1 Reply)
Discussion started by: [MA]Flying_Meat
1 Replies
Login or Register to Ask a Question