Simple arithmetic operation

I have no idea why I can't get this to work, if anybody can help i would appreciate it.

#!/bin/bash
x=`cat counter.txt | wc -l`
y= '$x / 7'
printf "%d People have visited this page" $y

:confused:

You may go over bash's syntax.

  1. It is better to use $() instead of `` in bash, a modern shell.
  2. The syntax of Arithmetic expression in Bash: $(())
    y=$(($x / 7))
  3. No "printf" command
    echo "$y People have visited this page"
  4. Use "sh" instead of "bash", the former is usually a softlink to "bash"

Welcome to 《樱桃视频影院在线播放下载》电视剧-高清完整版在线观看 - 侠客电影网

Try this :

echo "$(( $(wc -l < counter.txt) / 7 )) People have visited this page"