mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-10 10:04:30 +02:00
global-functions: introduce function $PrettyPrint
... to add trailing carriage return when printing to terminal: [admin@MikroTik] > $PrettyPrint [ $DeviceInfo ] Hostname: MikroTik Board name: hAP ac^2 Architecture: arm Model: RouterBOARD D52G-5HacD2HnD-TC Serial number: 8A2A09A221A1 RouterOS: Channel: testing Installed: 7.4rc1 RouterOS-Scripts: Current: 81
This commit is contained in:
parent
b0992da03d
commit
eda75f0bbc
1 changed files with 10 additions and 0 deletions
|
@ -40,6 +40,7 @@
|
|||
:global MkDir;
|
||||
:global NotificationFunctions;
|
||||
:global ParseKeyValueStore;
|
||||
:global PrettyPrint;
|
||||
:global QuotedPrintable;
|
||||
:global RandomDelay;
|
||||
:global Read;
|
||||
|
@ -648,6 +649,15 @@
|
|||
:return $Result;
|
||||
}
|
||||
|
||||
# print lines with trailing carriage return
|
||||
:set PrettyPrint do={
|
||||
:local Input [ :tostr $1 ];
|
||||
|
||||
:global CharacterReplace;
|
||||
|
||||
:put [ $CharacterReplace $Input ("\n") ("\n\r") ];
|
||||
}
|
||||
|
||||
# convert string to quoted-printable
|
||||
:global QuotedPrintable do={
|
||||
:local Input [ :tostr $1 ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue