Getting a variable from a text-file (bash)
Hello y'all,
I have a text-file which contains a number (ex: 32)
I want to do some calculations with the content of this text-file.
ex: 3200 - "number in the text-file" (so 3200 - 32)
Now, my idea is to MAKE A VARIABLE (var) from the content of the text-file so that i can do this with a bash-script:
#!/bin/sh
pc 3200 - $var > outcome.txt
exit
(pc = the Python Calculator, works great by the way!)
What i can't manage is to make a variable from the content of the text-file .
Any tips? ideas? solutions?
Greetings from the Netherlands
Patrick
|