Problem scenario
You have a flat file that may have lines that terminate (or end) with semicolons or commas. You want to print one line of this file at a time without commas or semicolons. How do you do this with Linux?
Prerequisite
You have a file named "list" (with no extension) in the same directory as this script below.
Solution
Run this Bash script:
while read list; do
var1=$(echo $list | sed 's/,//g') # remove the comma if any
var1=$(echo $var1 | sed 's/;//g')
echo $var1
done <list