|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Size calculation MB to GB
PHP Code:
HTML Code:
("bootinfo -s " disk)/1024
Please advise. |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Divide at the print function eks Code:
("bootinfo -s " disk) | getline; printf "%s\t",$0/1024; sum+=$0/1024 |
| The Following User Says Thank You to Jotne For This Useful Post: | ||
Daniel Gate (02-09-2013) | ||
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thank you! it works perfect!
|
|
#4
|
|||
|
|||
|
Or Code:
("bootinfo -s " disk) | getline; $0/=1024; printf "%s\t",$0; sum+=$0 |
| The Following User Says Thank You to RudiC For This Useful Post: | ||
Daniel Gate (02-11-2013) | ||
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Script to read file size and send email only if size > 0. | welldone | Shell Programming and Scripting | 5 | 04-29-2011 10:03 AM |
| The scripts not able to make the file to size 0, every times it go back to its original size | mridul10_crj | Shell Programming and Scripting | 0 | 10-03-2010 05:55 AM |
| File Size calculation with AWK | EAGL€ | Shell Programming and Scripting | 1 | 09-04-2009 11:04 AM |
| Partitioning script for rescue mode (disk size calculation) | pug123 | Shell Programming and Scripting | 1 | 07-29-2008 02:05 PM |
| command to find out total size of a specific file size (spread over the server) | abhinov | Solaris | 3 | 08-08-2007 06:48 AM |
|
|