Search Results

Search: Posts Made By: Loc
41,259
Posted By Loc
To re-iterate my original question: I get 2...
To re-iterate my original question:

I get 2 numbers from a user and pass those 2 numbers to a function but it keeps on converting the numbers back to a string, so my function keeps crashing. If I...
41,259
Posted By Loc
Convert a String to a Number
I read in two numbers from a user but the number is a string.
#!/bin/bash
read -p "Enter first number: " num1
read -p "Enter second number: " num2
I know you can use the the "expr" or "bc"...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 11:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy