This lesson shows how to replace part of a string stored in a variable in bash scripting. We start with a variable var containing a string. Using the syntax ${var/old/new}, bash replaces the first occurrence of the substring 'old' with 'new'. The replaced string is then stored in a new variable or used directly. We traced the steps: assigning the initial string, performing the replacement, assigning the result, and printing it. We also clarified that only the first match is replaced unless you use double slashes. If the substring is not found, the string remains unchanged. This helps beginners understand how to manipulate strings easily in bash scripts.