#!/bin/bash echo path functions test script src=$BASH_SHELL_BASE/function/01-path [[ -f $src ]] && source "$src" || echo no file: $src export test_path=/bin:/usr/bin:/opt/go/bin ins=/usr/sbin path_insert $ins after /usr/bin test_path path_insert $ins before /usr/bin test_path path_insert $ins after /opt/go/bin test_path path_insert $ins before ^/bin: test_path unset test_path unset ins