If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > passing * in unix

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-23-04, 10:22
sqlserver2k sqlserver2k is offline
Registered User
 
Join Date: May 2002
Location: Timbaktu
Posts: 185
passing * in unix

I need to pass "select * from sysusers" string to one of the parameter in the unix command prompt.
When I do that, it start showing me all the files under the directory.

What is the best way to pass the 'select *' kind of query in unix?
Reply With Quote
  #2 (permalink)  
Old 03-23-04, 10:44
aigles aigles is offline
Registered User
 
Join Date: Jan 2004
Location: Bordeaux, France
Posts: 319
You have the choice :
Code:
the_script 'select *'
the_script "select *"
the_script select '*'
the script select \*
in your script, when you use the parameter enclose it within double quotes:
Code:
echo "$*"   # display : select *
echo  $*     # display : select list of files
__________________
Jean-Pierre.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On