The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 -->
  #1 (permalink)  
Old 05-29-2007
ericaworld ericaworld is offline
Registered User
  
 

Join Date: May 2007
Posts: 11
get integer part

Hi,
I did a df|awk| command and it returns a percentage "94%",
how could I only get the integer part
"94" out of it, so I can compare it to another number,

I knwo that I have to pipe it to sth, but "grep [0-9]" did not work, it still give me number WITH the percentage, does someone know what command I should pipe it to?

Sincerely,