File: ucf_library.sh

package info (click to toggle)
ucf 3.0052
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,204 kB
  • sloc: sh: 1,384; perl: 397; makefile: 31
file content (23 lines) | stat: -rw-r--r-- 372 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Shared functions for ucf and ucfr

vset() {
    # Value Doc_string
    if [ -z "$1" ]; then
	echo >&2 "$progname: Unable to determine $2"
	exit 1
    else
	if [ -n "$VERBOSE" ]; then
	    echo >&2 "$progname: $2 is $1"
	fi
	printf '%s' "$1"
    fi
}

withecho () {
        echo "$@" >&2
        "$@"
}

escape_bre () {
    printf '%s' "$1" | sed -e 's#[.[\*^$]#\\&#g'
}