9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi I was hoping someone could help me with a sed script I am trying to write? I am on a Mac running ElCapitan
I have some text that I have converted from a pdf that I want to format into an xml file.
In the file I have managed to delete all the text I do not need. The text I have left is... (8 Replies)
Discussion started by: Paul Walker
2. Shell Programming and Scripting
In one of my script, I would like to sort the decimal numbers.
If I have numbers like
1.0 1.1 1.2 2.0 2.1 3.0 4.0 5.0 6.0 7.0 7.1 7.10 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9
I would like to sort them
1.0 1.1 1.2 2.0 2.1 3.0 4.0 5.0 6.0 7.0 7.1 7.2 7.3 7.4... (3 Replies)
Discussion started by: sachinrastogi
3. Shell Programming and Scripting
I have a below snippet of code from my perl script and its causing a problem when the output of $lTAX is 0 (zero) its getting displayed as -0.00. I want output to be 0 not -0.00. Any help would be appreciated.
my $lTotA = 50.94;
my $lVatA = 8.49;
my $lAdjNr =... (4 Replies)
Discussion started by: Devesh5683
4. Shell Programming and Scripting
Easy question for everyone. I'm trying to run a command line to find an exact match of a decimal number within a file. The number can be a positive OR negative number. For instance, if I want to find only the number -1 in the file that has:
-15.3... (6 Replies)
Discussion started by: lucshi09
5. Shell Programming and Scripting
I have a file of decimal numbers,
I want to see the output as only 7 digits after decimal (5 Replies)
Discussion started by: senayasma
6. UNIX for Dummies Questions & Answers
In my code I am checking to see if a variable that contains a decimal number is greater than 0 in the following manner:
However I am getting the error message (if $i for the current iteration holds 9.6352)
command 9.6352 is not found
How can I rectify... (5 Replies)
Discussion started by: Gussifinknottle
7. Shell Programming and Scripting
I would like to test for a max number value. It may be a decimal so I know I have to pipe into bc.
I just cannot get the syntax for this to work. I cannot get passed an error with the bracket - see below.
Any help appreciated.
/export/home/ewan> cat... (5 Replies)
Discussion started by: emjs
8. Shell Programming and Scripting
i've a code
if (($A && ((!($A =~ /^\d+$/)))))
-- -- not a number
--- its number.
which matches for integer value, i need to modify that pattern where it matches decimal number with 2 decimal points and also integer value.
for eg: values 10, 10.00. 0.1, 1 , 3 must... (2 Replies)
Discussion started by: asak
9. Shell Programming and Scripting
echo "scale=2; 282.73/640" | bc
This will print .44
How to make the variable as 0.44 (2 Replies)
Discussion started by: sandy1028