![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| NTFS under Solaris (switching from windows to Solaris server) | microbot | SUN Solaris | 2 | 07-14-2009 10:46 AM |
| Now possible to upgrade directly from Solaris 8 SPARC to latest Solaris 10 release | iBot | Solaris BigAdmin RSS | 0 | 04-21-2009 08:15 PM |
| Solaris 10 System Administration Essentials (Solaris Series) | iBot | Solaris BigAdmin RSS | 0 | 01-16-2009 09:30 AM |
| Solaris Jedi: A quick way to check UDP ports on Solaris | iBot | Solaris BigAdmin RSS | 0 | 12-03-2008 09:20 AM |
| Disk Mirror in Solaris 9 via Solaris Volume Manager | deal732 | SUN Solaris | 3 | 05-02-2007 12:43 PM |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
awk in solaris
Friends, I have a awk script which will calculate values for columns which is working fine in linux but failing in solaris.
here is my awk script iostat -dt $INTERVAL $ITERATION | awk 'NR>4' | egrep -v "Linux|Device|Time|AM|PM|sda[0-9]" | awk '{if(/^$/){printf("%f \n" ,sum); sum=0}else{sum+=$2}} but a similar thing is failing on solaris here is the script on solaris sar -d 2 2 | sed -n '/Average/!p;/Average/q;' | egrep -v "nfs[0-9]|device"|awk 'NR > 2 { if ($1 !~ /,.+/) print }'| awk ' {if(/^$/){printf("%f \n" ,sum); sum=0}else{sum+=$2}} ' . Can any one pls clarify why its failing in solaris and whats the remedy |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|