This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
bash-shell-base/modules/editing/block/test/test.sh

31 lines
883 B
Bash
Executable File

#!/bin/bash
rm test.txt
echo "some first text
some middle text
some after text" > test.txt
source ./block.sh
set-block -n "GO ENVIRONMENT" -d "comment before"
set-block -f "./test.txt"
# add-block "some middle text"
add-block
block-remove-content
block-add-line "1 added to beginning"
block-add-line --end "2 added to end"
block-add-line "3 yet another added to beginning"
block-add-line "4 yet yet another added to beginning -- remove later"
block-add-line --end "5 finally one added to end"
block-add-line ^2 "added after line 2"
block-add-line --before ^2 "added before line 2"
block-change-line "finally" "last line was changed to this"
echo modifying block
sleep 5
block-modify-line "3" yet **yet**
modify-block added *added*
echo removing line with "remove"
sleep 5
block-remove-line "remove"
echo "done with example, deleting"
sleep 5
echo removing block now
remove-block