[root@localhost SHELL]# NAME="I am a student student"
[root# echo ${NAME//student/teacher}
I am a teacher teacher
[root# echo ${NAME/#student/teacher}
I am a student student
[root# echo ${NAME/%student/teacher}
I am a student teacher
[root# echo ${NAME/%I am /teacher}
I am a student student
[root# echo ${NAME/#I am /teacher}
teachera student student
[root# echo ${NAME/#I am a/teacher}
teacher student student
[root# echo $NAME
I am a student student
[root#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17