![]() |
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 |
| 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 |
| Subtracting an Integer from a Variable | The Observer | UNIX for Dummies Questions & Answers | 2 | 06-10-2008 12:11 PM |
| Subtracting date / timestamps | roadcyclist | Shell Programming and Scripting | 0 | 06-21-2006 02:51 PM |
| subtracting a days from current date | rameshspal | Shell Programming and Scripting | 1 | 03-10-2006 01:18 AM |
| Subtracting Two months from date | jwatson12 | UNIX for Dummies Questions & Answers | 3 | 09-13-2002 01:06 PM |
| Subtracting Variables which are commands | Astudent | UNIX for Dummies Questions & Answers | 2 | 03-30-2001 09:55 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
subtracting variables in ksh
hi all,
how do i subract variables in shell ?? am trying to space out the headers and the output generated by the shell so they all line up : currently the output is like this : servers : users server1 : 10 latestServer : 50 so i thought i would keep a constant e.g 40 and subtract the length of the server name from it. count=${#myserver}; <-- this is the length of the server name spaces=((40 - $count )); <-- this doesnt really work thanks in advance. |