Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 817 Bytes

looper.md

File metadata and controls

49 lines (32 loc) · 817 Bytes

Raguel Spell: Looper

just loading looper
if [[ -z "$RAGUEL_DIR" ]]; then
  if [[ -z "$BASH_SOURCE" ]]; then
    RAGUEL_DIR=$(dirname $0)
  else
    RAGUEL_DIR=$(dirname "${BASH_SOURCE[0]}")
  fi
fi
export RAGUEL_DIR="$RAGUEL_DIR/../src"
. "${RAGUEL_DIR}/looper.sh"

repeat_run

syntax

# repeat_run <number_of_times> <command_to_repeat>

usage
repeat_run 5 "echo 'Running repeat_run with counter 5.'"

dir_list_run

It enables you to run all "dir $path" entries to a given command as param.

Set ENV var RAGUEL_PARALLEL=true to give it a non-blocking feel by bg-proc every command run.

syntax

# dir_list_run "<path_to_dir>" "<command_to_run_with_file_entries_as_target>"

usage
dir_list_run /tmp "la -lah"