The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 10-16-2008
ProGrammar ProGrammar is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 13
Quote:
Originally Posted by danmero View Post
Useless use of grep

Code:
df -kh | awk '/\/export/ && int($5) >= 85'

error:
Unmatched '


thanks for your input though. If you don't mind explaining, could you go into detail of the structure of this statement and why you did that.

I'm still trying to figure out the placement/requirement/caveats of (), [],{}, of which you're only using parentheses here. Hopefully you understand what I'm asking.

Am I right to assume the single quotes are to group the commands together or are they dual purpose in order to execute commands within the awk command as well as grouping the contents. kind of like sub-shell execution?

I'm familiar with using the forward-slash to initiate a search as within vi, less environments, then you're using the back-slash to escape the following forward-slash metacharacter which is a part of the search string...what's the last forward-slash's purpose in that statement? Also, the open-close parentheses around the integer and column id? If you have reference material, I'll gladly take as response.