Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Open Source > BOOK Beginning Linux Programming, 3rd Edition
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK Beginning Linux Programming, 3rd Edition
This is the forum to discuss the Wrox book Beginning Linux Programming, 2nd Edition by Richard Stones, Neil Matthew, Alan Cox; ISBN: 9780764543739
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK Beginning Linux Programming, 3rd Edition section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 3rd, 2005, 11:49 AM
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wrong teaching on shell conditions

On page 32 on shell conditions the authors suggest that the trailing ] is also added just for readability. This is wrong and an opening '[' must be followed by a closing one ']'. Following the discussion, a weird example is added:
ls -l /usr/bin [
which makes no sense at all and just produces an error message that the file '[' was not found!
  #2 (permalink)  
Old October 1st, 2005, 06:33 AM
Registered User
 
Join Date: Oct 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

this is not wrong. you have an extra space in your command. try it with no space between the slash and bracket:

--- cut ---
# ls -l /usr/bin/[
-rwxr-xr-x 1 root root 22132 Aug 6 23:36 /usr/bin/[
--- cut ---

  #3 (permalink)  
Old September 27th, 2006, 09:45 AM
Registered User
 
Join Date: Sep 2006
Location: Los Angeles, CA, USA.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Aminm:

The command "ls -l /usr/bin/[" is not an example at all of using the open bracket. The author is just proving that the close bracket is not needed by showing that the '[' is merely a symlink to the test command.

Murdock
 


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
teaching material dave1964_98 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 April 2nd, 2008 04:19 PM
Thanks for teaching me wwwbbb8510 EJB 0 November 17th, 2006 10:59 PM
Multiple conditions austinf XSLT 1 May 5th, 2006 02:55 AM
Multiple conditions austinf XSLT 1 May 5th, 2006 02:38 AM
Conditions in looping sridevi XSLT 0 July 31st, 2004 06:11 AM



All times are GMT -4. The time now is 12:58 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.