![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Output formating | jaydeep_sadaria | Shell Programming and Scripting | 1 | 04-10-2008 12:39 PM |
| formating output | Krrishv | Shell Programming and Scripting | 20 | 02-02-2007 09:39 AM |
| formating date | ragha81 | Shell Programming and Scripting | 2 | 01-05-2007 11:20 AM |
| How to concatenate two strings or several strings into one string in B-shell? | fontana | Shell Programming and Scripting | 2 | 08-26-2005 11:58 AM |
| Disk formating | DPAI | UNIX for Dummies Questions & Answers | 1 | 11-28-2001 08:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
formating number strings
I have treid searching for what I thought would be a common question...but to no avail.
I have to long numbers (4-8) digits. how can I format them so they are printed as 1,234,567 rather than 1234567? I have no idea where to start, have played with varying types of awk, print, substr. Also, pecentages.....if you have total amount and amount used how, using expr, can you work out the percentage used? I get 0 as the value. pecent=`expr $used / $avail \* 100` percent, used, and avail have all been set previously as an integer value. PS. I'm no mathsmatitiojkljknjn.....how ever you spell it, so my logic may be wrong. Cheers, Neil |
|
||||
|
many thanks.......
This may not be allowed V's questions........ But I'm using ksh....is this a weak shell? if it is what makes it so......I'm always looking to improve my scripting and if changing the shell or the language is required, then so be it. |
|
|||||
|
From: HANDY ONE-LINERS FOR SED
Quote:
|
|
||||
|
The one-liner is great and I understand what it does in the end, like putting a comma in as a delimiter. What I need, being a newb, is a breakdown of what each part of the one-liner is doing. I understand up until the substitution. Can anyone break this down for me? Because I would really like to understand the commands I'm planning on using.
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|