1SHTOOL-SUBST.TMP(1)         GNU Portable Shell Tool        SHTOOL-SUBST.TMP(1)
2
3
4

NAME

6       shtool subst - GNU shtool sed(1) substitution operations
7

SYNOPSIS

9       shtool subst [-v|--verbose] [-t|--trace] [-n|--nop] [-w|--warning]
10       [-q|--quiet] [-s|--stealth] [-i|--interactive] [-b|--backup ext]
11       [-e|--exec cmd] [-f|--file cmd-file] [file] [file ...]
12

DESCRIPTION

14       This command applies one or more sed(1) substitution operations to
15       stdin or any number of files.
16

OPTIONS

18       The following command line options are available.
19
20       -v, --verbose
21           Display some processing information.
22
23       -t, --trace
24           Enable the output of the essential shell commands which are
25           executed.
26
27       -n, --nop
28           No operation mode. Actual execution of the essential shell commands
29           which would be executed is suppressed.
30
31       -w, --warning
32           Show warning on substitution operation resulting in no content
33           change on every file. The default is to show a warning on
34           substitution operations resulted in no content change on all files.
35
36       -q, --quiet
37           Suppress warning on substitution operation resulting in no content
38           change.
39
40       -s, --stealth
41           Stealth operation. Preserve timestamp on file.
42
43       -i, --interactive
44           Enter interactive mode where the user has to approve each
45           operation.
46
47       -b, --backup ext
48           Preserve backup of original file using file name extension ext.
49           Default is to overwrite the original file.
50
51       -e, --exec cmd
52           Specify sed(1) command directly.
53
54       -f, --file cmd-file
55           Read sed(1) command from file.
56

EXAMPLE

58        #   shell script
59        shtool subst -i -e 's;(c) \([0-9]*\)-2000;(c) \1-2001;' *.[ch]
60
61        #    RPM spec-file
62        %install
63            shtool subst -v -n \
64                -e 's;^\(prefix=\).*;\1 $RPM_BUILD_ROOT%{_prefix};g' \
65                -e 's;^\(sysconfdir=\).*;\1 $RPM_BUILD_ROOT%{_prefix}/etc;g' \
66                `find . -name Makefile -print`
67            make install
68

HISTORY

70       The GNU shtool subst command was originally written by Ralf S.
71       Engelschall <rse@engelschall.com> in 2001 for GNU shtool.  It was
72       prompted by the need to have a uniform and convenient patching frontend
73       to sed(1) operations in the OpenPKG package specifications.
74

SEE ALSO

76       shtool(1), sed(1).
77
78
79
8018-Jul-2008                      shtool 2.0.8              SHTOOL-SUBST.TMP(1)
Impressum