[shell] Add all_after_char function

This commit is contained in:
Ivan Malison 2017-07-15 13:41:32 -07:00
parent 57e1a9e4b0
commit 26a6305945
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8

View File

@ -471,3 +471,9 @@ function all_lines_after {
function list_interfaces {
ip link show | grep -vE '^ ' | get_cols -F ':' 2 | xargs -n 1
}
function all_after_char {
while read -r line; do
echo ${line##*$1}
done;
}