From 26a63059458c7f89fb669aa7ee31ae9bd60bc126 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 15 Jul 2017 13:41:32 -0700 Subject: [PATCH] [shell] Add all_after_char function --- dotfiles/lib/shellenv/functions.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dotfiles/lib/shellenv/functions.sh b/dotfiles/lib/shellenv/functions.sh index a5f582c5..22a5c814 100644 --- a/dotfiles/lib/shellenv/functions.sh +++ b/dotfiles/lib/shellenv/functions.sh @@ -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; +}