Am using a bash script to read from a csv file :
#!/bin/bash
b=".html"
declare -a files=()
while read line
do
files+=("${line}${b}")
done < all_fr.csv
echo "${files[@]}" | tr ' ' '\n'
the variable $line
contains an ID
and i want to add .html
on every ID, i tried the code above and it give me an output like this:
.html77
.html92
.html98
.html00
.html97
.html27
.html31
.html39
.html44
.html45
.html60
My IDs are long exemple : 43567
when i do store in the list $line the output is good no problem, the problem appears when i add .html
PS: i tried to use a variable : a= $line.html
but didn't work for me