Sed find and replace

In the example below, we explore the find and replace functionality with command-line utility: sed

Suppose we have a sample.txt file with the following content:

$ cat sample.txt
John,28,Engineer,Manager,
Anna,23,Analyst,Associate,
Jenna,29,Data Science,Manager,
Tom,20,Engineer,Intern 

To replace the comma delimiter with sed, we use the following command:

$ sed 's/,/|/g' sample.txt
John|28|Engineer|Manager|
Anna|23|Analyst|Associate|
Jenna|29|Data Science|Manager|
Tom|20|Engineer|Intern