Using sed for Substitution in Scripts
📖 Scenario: You are working on a script that processes a text file containing product names and prices. You want to update the prices by increasing them by 10% using sed substitution commands.
🎯 Goal: Build a bash script that uses sed to substitute old prices with new prices in a text file.
📋 What You'll Learn
Create a text file variable with product names and prices
Create a variable for the price increase percentage
Use
sed substitution to update prices by 10%Print the updated text to the terminal
💡 Why This Matters
🌍 Real World
Automating price updates in product lists or configuration files without manual editing.
💼 Career
Many automation and scripting jobs require text processing and substitution using tools like sed.
Progress0 / 4 steps