![]() ex1: numberofpositions2 inputstring345987 Output 345,987.00 ex2: numberofpositions4 inputstring1345987 Output 1,345,987.0000 Please respond as soon as possible edit by bakunin: we will gladly respond as soon as. ![]() Conversion of string into currency value. There are only contexts in which a string can be interpreted as an integer.bash can't handle floating-point arithmetic at all zsh can, but only in an arithmetic command like (( a1 < 0.05 )). Log in to get rid of this advertisement Hello all, I need to convert an integer to a decimal to compare it to another decimal value for later use. Korn Shell manipulating the string into dynamic currency number. So I was wondering how I could convert a1 to an integer and compare it to 0.05. Rep: bash scripting: converting integer to decimal. The problem is: a1 a2 seem to be of type string instead of integer or float, and the error reads as: [: integer expression expected: 2.23834809459446e-06 So my shell script goes like this a1=$(awk 'NR=2' $1/$file) If the values of the last column of row 2 and row 3 are both less than 0.05, then I want to move this. The overall goal of the LDP is to collaborate in all of the issues of Linux documentation. txt file which is similar to a dataframe. The Linux Documentation Project is working towards developing free, high quality documentation for the Linux operating system.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |