Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- # tivasyk <tivasyk@gmail.com>
- # Launch to test: ./test "<TAG_1>Test<TAG_2>"
- TEST="$@"
- printf "Received line: «${TEST}»\n"
- while [[ ${TEST} =~ "<"[A-Z_0-9]*">" ]]; do
- TAG="<${TEST#*<}"
- TAG="${TAG%%>*}>"
- printf "Found a tag: ${TAG}, deleting...\n"
- TEST="${TEST/${TAG}/}"
- done
- printf "Result without tags: «${TEST}»\n"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement