How to cut till first delimiter and get remaining part of strings?
Simply with cut
command:
echo "pandi/sha/Dev/bin/boot" | cut -d'/' -f2-
sha/Dev/bin/boot
-d'/'
- field delimiter-f2-
- a range of fields to output (-f<from>-<to>
; in our case: from2
to the last)
Using shell (POSIX sh/bash/Korn/zsh) parameter substitution expansion
.
string="pandi/sha/Dev/bin/boot"
echo "${string#*/}"