Welcome to the Linux Foundation Forum!

Not able to get the print output

Hello Everyone!!
I have one file named a.txt in which I have some 10-15 words in format-
AB
AC
AV

So now I am creating bash file named dir.sh in which I am giving-

FILENAME="$1.txt"

LINES=$(cat $FILENAME)

for L in $LINES
do
echo "$L"

printf "\n"

printf "$1_views"

done

And when I am running "./dir.sh a"

I am getting output :

AB

AC

AV

Means I am not able to get output of echo "$L" ......but not able to get output of printf "$L_views"
So can someone help me with this like how to get output for printf "$L_views"

Thanks in advance!!

Categories

Upcoming Training