The UNIX and Linux Forums  
Hello and Welcome from 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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
replaying a record count with another record count er_zeeshan05 Shell Programming and Scripting 2 10-30-2008 12:14 AM
Sorting using count, grep and count sukhpal_78 UNIX for Dummies Questions & Answers 2 06-27-2008 01:13 AM
How to count the record count in an EBCDIC file. oracle8 UNIX for Dummies Questions & Answers 1 07-26-2006 08:22 PM
CPU count hshapiro UNIX for Dummies Questions & Answers 2 04-03-2006 02:08 PM
Count help - newbie britney Shell Programming and Scripting 11 03-21-2006 06:06 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-28-2008
halola85 halola85 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 13
count the max by awk

hey everybody ..
I have a problem when I use this command to count the Max number by awk it give to me 99 while there are numbers bigger than 99


awk 'NR==0 { temp = $0 ;next}
{ if ( $0 >= temp ) { temp=$0 } }
END{ print "Maximum Number:"temp""}' file

thank you for your help ..
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0