RosettaCodeData/Task/Substring-Top-and-tail/UNIX-Shell/substring-top-and-tail-1.sh

4 lines
89 B
Bash
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
str='abcdefg'
echo "${str#?}" # Remove first char
echo "${str%?}" # Remove last char