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 > help with a command outcome????

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-01-07, 21:37
rfourn rfourn is offline
Registered User
 
Join Date: Jun 2007
Posts: 11
help with a command outcome????

im trying to find the outcome of the following command:

$ echo line one> line 2 (where $ is the prompt and the > is printed by the shell)

i have no clue what this means???
Reply With Quote
  #2 (permalink)  
Old 06-02-07, 04:50
Tyveleyn Tyveleyn is offline
Registered User
 
Join Date: Aug 2006
Location: The Netherlands
Posts: 248
Hi,

To limit the number of arguments of the echo command you have to quote them otherwise all words/symbols of the line following echo will be regarded as arguments for it. So to get what you want you need to write:
Code:
$ echo "line one" > "line 2"
In this case the filename "line 2" is also quoted because with '> line 2' the shell will put echo's output in 'line' and has no clue to what '2' is.

Regards
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