답변:
제거 할 문자를 알고있는 경우 매개 변수 확장에서 대체를 사용할 수 있습니다.
myVar=${myVar/E} # Replace E with nothing
또는 유지할 문자를 알고있는 경우 :
myVar=${myVar/[^YS]} # Replace anything but Y or S
또는 위치를 알고있는 경우 :
myVar=${myVar:0:1}${myVar:2:1} # The first and third characters