#!/bin/bash q=$(bc <<< scale=2;$p*100)head -n$q numbers.txt > secondcoordinate.txtThat's just part of the script, but I think it's enough to clarify my intentions. p is a variable with just two decimals, so q should be an integer... Nevertheless,  bc shows, for example, 10.00 instead of 10.How can I solve this? 
how to make bc to show me 10 and not 10.00
bc
You can't do this with the obvious scale=0 because of the way that the scale is determined.The documentation indirectly explains that dividing by one is sufficient to reset the output to match the value of scale, which defaults to zero:expr1 / expr2 The result of the expression is the quotient of the two expressions. The scale of the result is the value of the variable scale.p=12.34; echo ($p*100) | bc1234.00p=12.34; echo ($p*100)/1 | bc1234If your version of bc does not handle this, pipe it through sed instead:p=12.34; echo ($p*100) | bc | sed 's!\.0*$!!'1234This RE will only strip trailing zeros from an integer number. So 3.00 will reduce to 3, but 3.10 will not reduce to 3.1. If you really need the full ability to strip the trailing zeros from a decimal number, a PCRE is required:p=12.34; echo ($p*100) | bc | perl -pe '/\./ && s/0+$/$1/ && s/\.$//'But if you're going to use perl then you might as well dispense with bc in the first place:p=12.34; perl -e '$p = shift; print $p * 100, \n' $p