Numerical value shortcuts

If you want to enter a numerical value, for example a Time To Live in seconds, in a master file or configuration file, you can often use short notation.

For example, if you mean “two hours”, rather than entering “7200” (for 7200 seconds), you can enter 2h. If you mean “two fours and thirty minutes”, you can enter “2h30m”.

The following postfixes are available:

Character Factor Meaning
K 1024 Kilobyte (for file sizes)
M Megabyte (for file sizes)
G Gigabyte (for file sizes)
m 60 Minute
h 3600 Hour
d 86400 Day
w 608400 Week
y 31536000 Year

Places where these shortcuts can be used include DNS master files, the Posadis posadisrc configuration file, or pretty much anywhere in Posadis you need to enter a number.

In Poslib, txt_to_int and txt_to_negint support numerical value shortcuts; to convert a TTL to text using this notation, use str_ttl (this will only use time-related postfixes m, h, w and y).

 
  dns/numerical_value_shortcuts.txt · Last modified: 2005/01/25 10:05
 
Copyright © Meilof Veeningen, 2002-2005 - About Posadis.org