-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest
More file actions
executable file
·58 lines (46 loc) · 755 Bytes
/
test
File metadata and controls
executable file
·58 lines (46 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh -e
FILE=/tmp/file
#DEBUG=-d
cat > "${FILE}" << EOF
#
# Blah
#
one
two
EOF
echo DROP-IN STANDARD OUTPUT:
./drop-in ${DEBUG} -n stuff /etc/issue - <<EOF
Line 1
Line 2
Line 3
EOF
echo
echo INITIAL FILE:
cat "${FILE}"
echo
echo DROP-IN TOP:
./drop-in ${DEBUG} -n -t stuff - "${FILE}" <<EOF
This was dropped in
EOF
cat "${FILE}"
echo
echo REMOVE TOP:
./drop-in ${DEBUG} -r stuff /dev/null "${FILE}"
cat "${FILE}"
echo
echo DROP-IN BOTTOM:
./drop-in ${DEBUG} -n stuff - "${FILE}" <<EOF
This was dropped in
EOF
cat "${FILE}"
echo
echo REPLACE BOTTOM:
./drop-in ${DEBUG} -n stuff - "${FILE}" <<EOF
This is a replacement
EOF
cat "${FILE}"
echo
echo REMOVE BOTTOM:
./drop-in ${DEBUG} -r stuff /dev/null "${FILE}"
cat "${FILE}"
rm -f "${FILE}"