From 597b0e3714f3e6e267ef9206555489f6c8a2c7cb Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Sun, 19 Jun 2022 11:22:51 +0300 Subject: [PATCH 01/23] ongoing additions, changes, and fixes --- .DS_Store | Bin 0 -> 8196 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..1e72f65d330c05102de09fa4091aff77a793d3af GIT binary patch literal 8196 zcmeHMYitx%6h3EK%DtAy6iaCt*RB>wEk%|EtObN^yG1}MkL??DncW%agy~G#ncYPR zq=^zusKogAsRm8_VGPkk6E)HJ15GsX5g3`D&Yf+fP-0@D2In?& z&z#qtoHO6Kch3|6u)Aoi0cZpOMwg&!ElpP$LNBf>h7wAui6Z#}_^=8*7z303q7h{v z%0QHXC<9Rjq73{OGeBpy7;KhvUuvT{%0QHX|78Zm{t%~2&{Rk#B@MO?nt~R9sAvI# zLHE=L1U~VQrb0R?Y2Zq0%I*O}R}5PWlE}P40 z*?pNYx18~Hzvy-Ag?)nScU?PIxz}@pmRZiK^*yfR>y~2{0td@5$z=bKfoJBy@wB#WW-XqiEn0g*v^OZ?)W&x<4JLs*2C0y+5O_#J9W?BHDNmRcoAK1 zv!;y*d6!|B1_jaBute2%XgisDo{f5AdcoXPCfrrzyBP~!9?8W@y@utx)5?CKR4u1u z5v1ugNMy5?RGS1CTNGvuoXtBq#P*26g&o};Td=l&cbW(4txL~ z!bk8iT!1g(8~6c!f?wfx1Vp?6YjHj# zFpm}%(8D5@@B}`BkK!qu!l&_Bd=Agx^Y|*hh3D`+d>=o-Pw_lnz_0LI{0_gzUzBQP zj#8sEDNB_WrB$I%fMO_>>KT=MWmdZBZr1IAswdnYlp|NGp4isAw{8Dds^{~0qF(A2 z-B`c)=9bn~$vZZtrXeLkSi#+&@f<+-GT;Xg4&M4q?8(C7u>r!kd33h=Qs)XZvx~yI zInHD19I67zE?Z7)4OM_-Z)=OiRD}vpvbV2}akYxdiU+=H+la-G>9~_~wVDb{>Ned) zEQp$yd{;NEB+7;Tec+yfm*5q61I`g}FToe^HT(!a!*5tkKyAQA0_#l}Be1q&8?MB5 zT#p^ti5m#IY21q2a69h63=ZHB4&w*`*FX~wqKiieygtGA1Ww{Z_%NQt)A%?(fluO7 z0gPY3mn8(Jfw`jsNlEeTYXP&ADLA(493quBC5Et@lr(UmNtg(E(2f(G{)Zvm$3tBzq?3}8hQ>es UAs{;c|N0Nt==={bdOc2m0K_IT2LJ#7 literal 0 HcmV?d00001 From 2a6f833caf743cdb9ccd745269a6817a04ccd399 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Fri, 1 Jul 2022 11:09:04 +0300 Subject: [PATCH 02/23] ongoing additions, changes, and fixes --- ...ug-and-information-commands-cheat-sheet.adoc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc index 755884b..64a3b58 100644 --- a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc +++ b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc @@ -22,10 +22,21 @@ The commands below are meant to be run on the device CLI itself, not on provisio |*show config port _name_ statistics* | Statistics of the port: total bits/frames passed,maximum/minimum bits/sec seen, and most interesting - CRC errors, error frames, oversize frames, discards. -|*show config port _name_ statistics* -| Statistics of the port: total bits/frames passed,maximum/minimum bits/sec seen, and most interesting - CRC errors, error frames, oversize frames, discards. -|*config port name* +|*config port ethernet _number_* + +*clear-statistics* +|Clear all statistics/counters for this port. + +|*config flow* + +*flow _flow-name_* + +*show statistics running* +|Show detailed counters for the given flow, will include `bps`, max/min `bps` seen after reboot, `drops` if any. + + +|*config port _name_* *rate-measure interval _seconds_* From 677a5d6fdb459b0b274cad5ecbe841bdf66912d4 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Sat, 9 Jul 2022 19:46:58 +0300 Subject: [PATCH 03/23] Added ImageMagic and 7zip pages --- ...zip-command-line-cookbook-of-examples.adoc | 25 +++++++++++++++++++ .../ImageMagick-command-line-examples.adoc | 1 + 2 files changed, 26 insertions(+) create mode 100644 cheat-sheets/7zip-command-line-cookbook-of-examples.adoc create mode 100644 cheat-sheets/ImageMagick-command-line-examples.adoc diff --git a/cheat-sheets/7zip-command-line-cookbook-of-examples.adoc b/cheat-sheets/7zip-command-line-cookbook-of-examples.adoc new file mode 100644 index 0000000..b41444a --- /dev/null +++ b/cheat-sheets/7zip-command-line-cookbook-of-examples.adoc @@ -0,0 +1,25 @@ += 7z Linux Command Line Cookbook of Examples +:homepage: https://github.com/yuriskinfo/cheat-sheets +:toc: + +Author: https://www.linkedin.com/in/yurislobodyanyuk/ + +== Important facts about 7-zip +* 7-zip does NOT store the owner/group of the files/folders being archived, which is good for privacy, but may not suite your specifc use case, especially as a back up tool. +* 7-zip is a name of the compression tool created by Igor Pavlov. +* While Igor Pavlov provides Linux/macOS versions as well, another implementation by independent developer (Mohammed Adnene Trojette) has become wide used in the Linux realm - `p7zip`. This cookbook relates to this, independent version, so options and switches may differ a bit from 7-zip Windows canonical version. + +== Install p7zip package on Linux +This tool is already in all the major repositories, so you should have no problems installing it. + +`Ubuntu`: `sudo apt install p7zip-full` + +`CentOS/Fedora`: `sudo yum install p7zip p7zip-plugins` + +== Create an archive adding all the files in the current folder +We first indicate to `7-zip` that we want to _add_ to an archive with `a` command, then we specify the archive name, and finally, we use `*` as wildcard to include all files in the current folder. + +`7z a folder.7z *` + +The result - _folder.7z_ will be placed in the same folder where it run. + diff --git a/cheat-sheets/ImageMagick-command-line-examples.adoc b/cheat-sheets/ImageMagick-command-line-examples.adoc new file mode 100644 index 0000000..f3840e2 --- /dev/null +++ b/cheat-sheets/ImageMagick-command-line-examples.adoc @@ -0,0 +1 @@ += ImageMagick Command Line Examples From 1892f45a6513aa6e0d572fbeda178c31995c9b16 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Sun, 10 Jul 2022 20:54:51 +0300 Subject: [PATCH 04/23] ImageMagic cheat sheet --- cheat-sheets/ImageMagick-command-line-examples.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cheat-sheets/ImageMagick-command-line-examples.adoc b/cheat-sheets/ImageMagick-command-line-examples.adoc index f3840e2..7f50e96 100644 --- a/cheat-sheets/ImageMagick-command-line-examples.adoc +++ b/cheat-sheets/ImageMagick-command-line-examples.adoc @@ -1 +1,14 @@ = ImageMagick Command Line Examples + + +== Rotate images 90 degrees + +Use `convert` tools in a bash script to rotate all .jpg images in the current folder, naming the rotated images as _current-name_-rotated.jpg + +[source,bash] +---- +for ii in *.jpg +do +convert ${ii} -rotate 90 ${ii}-rotated.jpg +done +---- From 66a7f52271dfca57f865e719faadd66defbabe9e Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Sun, 10 Jul 2022 20:57:13 +0300 Subject: [PATCH 05/23] ImageMagic cheat sheet --- cheat-sheets/ImageMagick-command-line-examples.adoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cheat-sheets/ImageMagick-command-line-examples.adoc b/cheat-sheets/ImageMagick-command-line-examples.adoc index 7f50e96..cc80d00 100644 --- a/cheat-sheets/ImageMagick-command-line-examples.adoc +++ b/cheat-sheets/ImageMagick-command-line-examples.adoc @@ -12,3 +12,13 @@ do convert ${ii} -rotate 90 ${ii}-rotated.jpg done ---- + + +== Combine images in the current folder into a PDF file +Let's combine images with extension .jpg (using shell wildcards) into one +PDF file. + +---- +magick *.jpg hoze-2022-1.pdf +---- + From 0cc72703380f6eb787fb4afdc0fcaadee72736fe Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Tue, 19 Jul 2022 18:02:27 +0300 Subject: [PATCH 06/23] Added to ETX --- ...205-220-debug-and-information-commands-cheat-sheet.adoc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc index 64a3b58..e2c34e9 100644 --- a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc +++ b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc @@ -71,7 +71,14 @@ service-ping local-ip 13.13.13.1/30 dst-ip 13.13.13.2 next-hop 13.13.13.2 egress |Show alarms log, their severity/state/last raised time +|*exit all* +|Exit all sub-configuration modes to the top level. +|*show file startup* +|Show startup configuration. + +|*save* +|Save the configuration. From 3177cb5a3d839b021affe3c5f36186a093ee9dbe Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Sat, 6 Aug 2022 17:37:23 +0300 Subject: [PATCH 07/23] Update ImageMagick-command-line-examples.adoc --- cheat-sheets/ImageMagick-command-line-examples.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/ImageMagick-command-line-examples.adoc b/cheat-sheets/ImageMagick-command-line-examples.adoc index cc80d00..dbf6691 100644 --- a/cheat-sheets/ImageMagick-command-line-examples.adoc +++ b/cheat-sheets/ImageMagick-command-line-examples.adoc @@ -19,6 +19,6 @@ Let's combine images with extension .jpg (using shell wildcards) into one PDF file. ---- -magick *.jpg hoze-2022-1.pdf +magick *.jpg pics-2022-1.pdf ---- From aca623524aef2a31e4adfc480631ffbcd899e41f Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Tue, 30 Aug 2022 19:33:24 +0300 Subject: [PATCH 08/23] Update ImageMagick-command-line-examples.adoc Added TOC --- cheat-sheets/ImageMagick-command-line-examples.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/ImageMagick-command-line-examples.adoc b/cheat-sheets/ImageMagick-command-line-examples.adoc index dbf6691..ea9eaaf 100644 --- a/cheat-sheets/ImageMagick-command-line-examples.adoc +++ b/cheat-sheets/ImageMagick-command-line-examples.adoc @@ -1,5 +1,5 @@ = ImageMagick Command Line Examples - +:toc: == Rotate images 90 degrees From 8882b247cfd40dfa5c97cec6da1942a8b762c59f Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Wed, 31 Aug 2022 20:40:42 +0300 Subject: [PATCH 09/23] Create Windows-cmd-shell-batch-scripting-cheat-sheet.adoc 1st commit of cmd.exe batch scripting cheat sheet. --- ...cmd-shell-batch-scripting-cheat-sheet.adoc | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc new file mode 100644 index 0000000..d1e5c61 --- /dev/null +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -0,0 +1,40 @@ += Windows cmd shell batch scripting cheat sheet +Yuri Slobodyanyuk +v1.0, 2022-08-31 +:homepage: https://yurisk.info +:toc: +Author: Yuri Slobodyanyuk, https://www.linkedin.com/in/yurislobodyanyuk/ + + +== Controlling scripts themselves +[cols=2, options="header"] +|=== +|Command +|Description + +|*rem* +|Comment, till the end of line. It can be used to comment out a whole line or part of it. + +|*cls* +|Clear the screen buffer. + +|*echo _text to display_* + +*echo off/on* + +*echo.* +|Print text on line, or, with `off/on` switch without text, turn off/on echoing the commands being run. +Usually, you set `echo off` as the 1st line in a batch script, and the `echo on` as the last line. Turning +echoing off does not hide _output_ of the commands run, just the commands themselves. The 3rd option is `echo` followed immediately +by _dot_ and it causes echo to print a blank line (an dthis is the only way to do so). + +|*@* +|Turn off echoing only for the command preceded by this @. Usually, also used as `@echo off` to prevent the _echo off_ +being printed itself. + +|*title _Title bar text_* +|Change the title of the cmd.exe window for this session. As a rule of a good style, change _title_ on each stage of the +script, to let users know what the script is doing. + + +|=== From 6e8c6f99bea75d0de2c8539bfb418a52b8c5f451 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Wed, 31 Aug 2022 20:41:14 +0300 Subject: [PATCH 10/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index d1e5c61..d73a703 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -13,7 +13,7 @@ Author: Yuri Slobodyanyuk, https://www.linkedin.com/in/yurislobodyanyuk/ |Description |*rem* -|Comment, till the end of line. It can be used to comment out a whole line or part of it. +|Start a comment, till the end of line. It can be used to comment out a whole line or part of it. |*cls* |Clear the screen buffer. From 349d514333fec920da14f1a986a52869b7031d13 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Wed, 31 Aug 2022 20:42:30 +0300 Subject: [PATCH 11/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index d73a703..8a009ce 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -29,7 +29,7 @@ echoing off does not hide _output_ of the commands run, just the commands themse by _dot_ and it causes echo to print a blank line (an dthis is the only way to do so). |*@* -|Turn off echoing only for the command preceded by this @. Usually, also used as `@echo off` to prevent the _echo off_ +|Turn off echoing only for the command preceded by this @. E.g. `@echo off` to prevent the _echo off_ being printed itself. |*title _Title bar text_* From 653153ab46e0675f061c9b345ea1816c6cac1fcd Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Wed, 31 Aug 2022 20:47:30 +0300 Subject: [PATCH 12/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3706f76..40a2b41 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,6 @@ Make sure to __watch__ this repository to get notified on updates (usually updat [FAR file manager cheat sheet of keyboard shortcuts](cheat-sheets/FAR-manager-cheat-sheet-of-keyboard-shortcuts.adoc) | [PDF](cheat-sheets/FAR-manager-cheat-sheet-of-keyboard-shortcuts.pdf) - +[Windows cmd.exe shell batch scripting cheat sheet](cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc) From 56e06122991ebc8f6820e662f8569e59ada59f3e Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 1 Sep 2022 17:35:58 +0300 Subject: [PATCH 13/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- ...cmd-shell-batch-scripting-cheat-sheet.adoc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index 8a009ce..ec8be15 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -38,3 +38,22 @@ script, to let users know what the script is doing. |=== + + +== Script arguments +[cols=2, options="header"] +|=== +|Command +|Description + +|%_n_ +|Positional argument to the script from the command line. _n_ can be from 0 to 9. + +|%0 +|The script name. The actual arguments to the script start with %1. +E.g. `echo The script was called as %0, with the %1 as the first argument` + +|%* +|The rest of the positional arguments after the 9th. + +|=== From b8fcc9b6299ff33f425917ee98976e847e2ffe30 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 1 Sep 2022 18:18:01 +0300 Subject: [PATCH 14/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- .../Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index ec8be15..298c700 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -54,6 +54,9 @@ script, to let users know what the script is doing. E.g. `echo The script was called as %0, with the %1 as the first argument` |%* -|The rest of the positional arguments after the 9th. +|The rest of the positional arguments after the 9th, not accessible directly, only after `SHIFT`-ing. + +|*shift [/_n_]* +|Shift positional arguments by one. |=== From d1f263246a5c29d222b5dbe6dfeb4a03c677b453 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 1 Sep 2022 18:24:29 +0300 Subject: [PATCH 15/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- .../Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index 298c700..bdc4800 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -57,6 +57,7 @@ E.g. `echo The script was called as %0, with the %1 as the first argument` |The rest of the positional arguments after the 9th, not accessible directly, only after `SHIFT`-ing. |*shift [/_n_]* -|Shift positional arguments by one. +|Shift positional arguments by one. If `\n` is given, will shift starting with n+1. E.g. `shift \4` will shift 5th to become 4th, +6th will become 5th, and so on. |=== From 938e285cc58675a67d4926d5c71baeb3d79b571e Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 1 Sep 2022 18:30:25 +0300 Subject: [PATCH 16/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index bdc4800..08d4d56 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -57,7 +57,7 @@ E.g. `echo The script was called as %0, with the %1 as the first argument` |The rest of the positional arguments after the 9th, not accessible directly, only after `SHIFT`-ing. |*shift [/_n_]* -|Shift positional arguments by one. If `\n` is given, will shift starting with n+1. E.g. `shift \4` will shift 5th to become 4th, +|Shift positional arguments by one. If `/n` is given, will shift starting with n+1. E.g. `shift /4` will shift 5th to become 4th, 6th will become 5th, and so on. |=== From e90a032c11ec18a5a9bc62abac6cb6913b5d253a Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 1 Sep 2022 18:34:00 +0300 Subject: [PATCH 17/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index 08d4d56..009201a 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -58,6 +58,6 @@ E.g. `echo The script was called as %0, with the %1 as the first argument` |*shift [/_n_]* |Shift positional arguments by one. If `/n` is given, will shift starting with n+1. E.g. `shift /4` will shift 5th to become 4th, -6th will become 5th, and so on. +6th will become 5th, and so, while arguments before _n_ will stay untouched. |=== From 489237b06cb998525b86404b6bc0e8c0b2a09bc0 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 1 Sep 2022 22:27:33 +0300 Subject: [PATCH 18/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index 009201a..2346bf1 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -58,6 +58,6 @@ E.g. `echo The script was called as %0, with the %1 as the first argument` |*shift [/_n_]* |Shift positional arguments by one. If `/n` is given, will shift starting with n+1. E.g. `shift /4` will shift 5th to become 4th, -6th will become 5th, and so, while arguments before _n_ will stay untouched. +6th will become 5th, and so, while arguments before 4 will stay untouched. |=== From 1c2ae3e9543e9188fe4f2fb8bab8391a0160efe3 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 1 Sep 2022 22:27:59 +0300 Subject: [PATCH 19/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index 2346bf1..d2dc208 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -58,6 +58,6 @@ E.g. `echo The script was called as %0, with the %1 as the first argument` |*shift [/_n_]* |Shift positional arguments by one. If `/n` is given, will shift starting with n+1. E.g. `shift /4` will shift 5th to become 4th, -6th will become 5th, and so, while arguments before 4 will stay untouched. +6th will become 5th, and so on, while arguments before 4 will stay untouched. |=== From f9dd70fa9754bc30eea4a15f2875a76a45be0516 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 1 Sep 2022 22:33:01 +0300 Subject: [PATCH 20/23] Update Windows-cmd-shell-batch-scripting-cheat-sheet.adoc --- cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc index d2dc208..6f17729 100644 --- a/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc +++ b/cheat-sheets/Windows-cmd-shell-batch-scripting-cheat-sheet.adoc @@ -54,7 +54,7 @@ script, to let users know what the script is doing. E.g. `echo The script was called as %0, with the %1 as the first argument` |%* -|The rest of the positional arguments after the 9th, not accessible directly, only after `SHIFT`-ing. +|The rest of the positional arguments after the 9th altogether. The individual args are not accessible directly, use `SHIFT`-ing. |*shift [/_n_]* |Shift positional arguments by one. If `/n` is given, will shift starting with n+1. E.g. `shift /4` will shift 5th to become 4th, From a16a9d8b23ccc36ef31bb8eb6889047dc9703caf Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 15 Sep 2022 13:20:36 +0300 Subject: [PATCH 21/23] ongoing additions, changes, and fixes --- ...-203-205-220-debug-and-information-commands-cheat-sheet.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc index e2c34e9..ab11490 100644 --- a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc +++ b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc @@ -80,6 +80,8 @@ service-ping local-ip 13.13.13.1/30 dst-ip 13.13.13.2 next-hop 13.13.13.2 egress |*save* |Save the configuration. +|*clear-statistics* +|Clear all statistics - errors on interfaces, bytes ent/received, etc. |=== From d0c0e169b79e86ad00ce54fb670161e30e23f566 Mon Sep 17 00:00:00 2001 From: Yuri Slobodyanyuk Date: Thu, 15 Sep 2022 13:24:14 +0300 Subject: [PATCH 22/23] ongoing additions, changes, and fixes --- ...-203-205-220-debug-and-information-commands-cheat-sheet.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc index ab11490..b5bcc84 100644 --- a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc +++ b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc @@ -81,7 +81,7 @@ service-ping local-ip 13.13.13.1/30 dst-ip 13.13.13.2 next-hop 13.13.13.2 egress |Save the configuration. |*clear-statistics* -|Clear all statistics - errors on interfaces, bytes ent/received, etc. +|Clear all statistics - errors on interfaces, bytes sent/received, etc. |=== From 36b6a8c2d054b72ff9668c39b3b4ec5f5cdbe19d Mon Sep 17 00:00:00 2001 From: yuriskinfo Date: Sun, 18 Sep 2022 18:51:59 +0300 Subject: [PATCH 23/23] additions, corrections, etc. --- ...20-debug-and-information-commands-cheat-sheet.adoc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc index b5bcc84..cb6a6de 100644 --- a/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc +++ b/cheat-sheets/RAD-ETX-203-205-220-debug-and-information-commands-cheat-sheet.adoc @@ -20,7 +20,9 @@ The commands below are meant to be run on the device CLI itself, not on provisio | Show port status: administrative and operational states, speed/duplex, connector type, MAC address, and most important (for fiber) - RX/TX signal power (dBm) |*show config port _name_ statistics* -| Statistics of the port: total bits/frames passed,maximum/minimum bits/sec seen, and most interesting - CRC errors, error frames, oversize frames, discards. +| Statistics of the port: total bits/frames passed, maximum/minimum bits/sec seen, and most +interesting - CRC errors, error frames, oversize frames, discards, CV/ES/SES/FC stats for +E1 lines. |*config port ethernet _number_* @@ -81,7 +83,12 @@ service-ping local-ip 13.13.13.1/30 dst-ip 13.13.13.2 next-hop 13.13.13.2 egress |Save the configuration. |*clear-statistics* -|Clear all statistics - errors on interfaces, bytes sent/received, etc. +|Clear all statistics (at the highest config level) - errors on interfaces, bytes sent/received, etc. + +|*admin* + +*reboot* +|Reboot the device. |===