mirror of https://github.com/n-hys/bash.git
15 lines
297 B
Plaintext
15 lines
297 B
Plaintext
# these didn't work in versions of bash before bash-4.0
|
|
|
|
LNAME=nordholz
|
|
|
|
echo ${LNAME[$(( 0 ))]//h/!}
|
|
echo ${LNAME[$(( 2 ))]//h/!}
|
|
|
|
echo ${LNAME[$(( 0 ))]##??}
|
|
echo ${LNAME[$(( 2 ))]##??}
|
|
|
|
echo ${LNAME[$(( 0 ))]:2}
|
|
echo ${LNAME[$(( 0 ))]:2:4}
|
|
echo ${LNAME[$(( 2 ))]:2}
|
|
echo ${LNAME[$(( 2 ))]:2:4}
|