What's the difference between
temp=1? Why do I need the dollar sign?
#!/bin/bash temp=$1 cell=$((($temp-32)*5/9)) echo $cell
This question came from our site for professional and enthusiast programmers.
The dollar-sign triggers parameter expansion;
[In addition to what ruakh had already mentioned]
Your script attempts to convert a temperature value from Fahrenheit to Celsius scale. You could save your file with a name say,
When you do so, your
However, when you write