<commit_before>#!/bin/bash
###############################################################################
#                                                                             #
#   Filename        Library.bash                                              #
#                                                                             #
#   Description     A library of useful shell routines for Linux/Unix         #
#                                                                             #
#   Notes                                                                     #
#                                                                             #
#   History                                                                   #
#    2009-12-16 JFL Created this script.                                      #
#    2013-12-02 JFL Fixed the help screen. Added common command-line options. #
#                   Added Tcl-like list management routines.                  #
#    2013-12-09 JFL Added the -c option, and the fact function for testing.   #
#                   Renamed a few functions for consistency with other langs. #
#    2013-12-16 JFL One minor tweak in test routine fact().		      #
#                                                                             #
#          Copyright 2016 Hewlett Packard Enterprise Development LP          #
# Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 #
###############################################################################

# Global variables
VERSION="2013-12-16"
ARGV=("$0" "$@")		# All arguments, as an array of strings
ARGV0="$0"                      # Full script pathname
SCRIPT="${ARGV0##*/}"           # Extract the script base name...
SCRIPTDIR="$(cd $(dirname "$0") ; /bin/pwd)" # ... and its absolute path
SCRIPTBASE="${SCRIPT%%.*}"	# Script base name without extension

###############################################################################
#                                                                             #
#                              Debugging library                              #
#                                                                             #
###############################################################################

VERBOSITY=1			# Verbosity. 0=Quiet 1=Normal 2=Verbose 3=Debug
EXEC=1				# 1=Execute commands; 0=Don't

# LOGDIR=/var/log
# LOGFILE=$LOGDIR/$SCRIPTBASE.log	# Where to log what was done and results
LOGDIR=/dev
LOGFILE=/dev/null		# Where to log what was done and results

# Helper routines to test verbosity levels<commit_msg>Changed the default LOGDIR to match the default LOGFILE.<commit_after>#!/bin/bash
###############################################################################
#                                                                             #
#   Filename        Library.bash                                              #
#                                                                             #
#   Description     A library of useful shell routines for Linux/Unix         #
#                                                                             #
#   Notes                                                                     #
#                                                                             #
#   History                                                                   #
#    2009-12-16 JFL Created this script.                                      #
#    2013-12-02 JFL Fixed the help screen. Added common command-line options. #
#                   Added Tcl-like list management routines.                  #
#    2013-12-09 JFL Added the -c option, and the fact function for testing.   #
#                   Renamed a few functions for consistency with other langs. #
#    2013-12-16 JFL One minor tweak in test routine fact().		      #
#                                                                             #
#          Copyright 2016 Hewlett Packard Enterprise Development LP          #
# Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 #
###############################################################################

# Global variables
VERSION="2013-12-16"
ARGV=("$0" "$@")		# All arguments, as an array of strings
ARGV0="$0"                      # Full script pathname
SCRIPT="${ARGV0##*/}"           # Extract the script base name...
SCRIPTDIR="$(cd $(dirname "$0") ; /bin/pwd)" # ... and its absolute path
SCRIPTBASE="${SCRIPT%%.*}"	# Script base name without extension

###############################################################################
#                                                                             #
#                              Debugging library                              #
#                                                                             #
###############################################################################

VERBOSITY=1			# Verbosity. 0=Quiet 1=Normal 2=Verbose 3=Debug
EXEC=1				# 1=Execute commands; 0=Don't

LOGDIR=/var/log
LOGFILE=/dev/null		# Where to log what was done and results

# Helper routines to test verbosity levels
{'fraction_non_alphanumeric': 0.18793369313801078, 'fraction_numerical': 0.023515805705474173, 'mean_word_length': 1.116231647634584, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 58, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1307078', 'n_tokens_mistral': 1096, 'n_tokens_neox': 957, 'n_words': 299}