i have a shell script with the following:
filesize=22
incommon=25
num=$(bc <<< 'scale=2; ($incommon / $filesize) * 100')
output:
(standard_in) 1: illegal character: $
(standard_in) 1: illegal character: $
if i replace ($incommon / $filesize) with (22 / 55) for example it works fine. How can i get my variables passed into bc in this case?