diff options
author | osm0sis <osm0sis@outlook.com> | 2016-01-14 15:51:59 -0400 |
---|---|---|
committer | osm0sis <osm0sis@outlook.com> | 2016-01-14 15:51:59 -0400 |
commit | 65520217ef02a74630efca936ffaab83adade4d9 (patch) | |
tree | 65808e1bbc60acdc703a005d9b582169167ab846 /anykernel.sh | |
parent | 8c640412087a602e4bdc789a241922fcedc4a363 (diff) |
AK2: add remove_section, update documentation with note regarding escapes
Diffstat (limited to 'anykernel.sh')
-rwxr-xr-x | anykernel.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/anykernel.sh b/anykernel.sh index 2f794c5..1257283 100755 --- a/anykernel.sh +++ b/anykernel.sh @@ -115,6 +115,11 @@ replace_section() { sed -i "${line}s;^;${4}\n;" $1; } +# remove_section <file> <begin search string> <end search string> +remove_section() { + sed -i "/${2}/,/${3}/d" $1; +} + # insert_line <file> <if search string> <before|after> <line match string> <inserted line> insert_line() { if [ -z "$(grep "$2" $1)" ]; then |