add str_before and str_after
parent
96bb6113d7
commit
2e4ecc3539
|
@ -1,4 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
str_after () {
|
||||
echo "$1" | cut -s -d "${2:-=}" -f2
|
||||
}
|
||||
|
||||
str_before () {
|
||||
echo "$1" | cut -s -d "${2:-=}" -f1
|
||||
}
|
||||
|
||||
# must be json as a string, depends on jq
|
||||
get_prop_value () {
|
||||
local value
|
||||
|
@ -83,3 +92,4 @@ sed_ignore_comments () {
|
|||
eval $cmd < /dev/stdin
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue