Search Results

Search: Posts Made By: pina
7,760
Posted By pina
Thanks, Akshay Hedge and Andrew! This works...
Thanks, Akshay Hedge and Andrew!

This works nicely: variable=$(echo "($b+0.5)/1" | bc )
The command substitution didn't for some reason.
7,760
Posted By pina
Assigning bc output to a variable
I'm converting decimal to integer with bc, and I'd like to assign the integer output from bc to a variable 'val'.

E.g. In the code below: If b is 5000.000, lines 6 and 8 will output:
5000...
922
Posted By pina
Beautifully simple! Thanks a lot :-) I'm new to...
Beautifully simple! Thanks a lot :-)
I'm new to shell scripting and very much appreciate your help.
922
Posted By pina
[Solved] Reading in 4th number in a line
I'd like to read a file (mydata.dat) line by line. The file consists of 5 columns filled with numbers, like so:

83.018 1.953 49.587 20550.000 353
83.213 1.953 49.195 ...
Showing results 1 to 4 of 4

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