From a2b34ecfeb478dfe143c1d093d168259c8bcf2a9 Mon Sep 17 00:00:00 2001 From: berndfinger <49749572+berndfinger@users.noreply.github.com> Date: Fri, 14 Jul 2023 19:09:44 +0200 Subject: [PATCH] Add entry for sapfile --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 4f951d2..0979b16 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ # tool.sap_shell_scripts Collection of shell scripts to be used in SAP environments + +- sapfile: A program to display SAP file types based on file name patterns or patterns inside a file archive of type rar, zip, or sapcar. + Requires: + - `lsar` (contained in the `unar` package from the EPEL RHEL repo) + - `zipinfo` (contained in the `unzip` RHEL package) + - `sapcar` (SAP program to handle sapcar files; typical filename: SAPCAR_1115-70006178.EXE) + + For displaying all file patterns and SAP file types supported by the program, you can use the following command: +``` +awk '!/BEGIN/&&!/END/&&/_sap_file_type=/{gsub (" ", ""); gsub ("\\{_sap_file_type=\"", ": "); gsub ("\"\\}", ""); print}' sapfile +```