Using python, I was trying to remove string content from input_file, so in my delete_list I was passing "*.sh".
what should have been passed to remove strings from file to my delete_list to remove string values from file.
test.py
#!/usr/bin/env python3
import sys
infile = "input_file"
outfile = "expected_file"
delete_list = ["*.sh"]
with open(infile) as fin, open(outfile, "w+") as fout:
for line in fin:
for word in delete_list:
line = line.replace(word, "")
fout.write(line)
input_file
papaya.sh 10
Moosumbi.sh 44
jackfruit.sh 15
orange.sh 11
banana.sh 99
grapes.sh 21
dates.sh 6
expected_file
10
44
15
11
99
21
6