10 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
8 Replies
2. Shell Programming and Scripting
Input file:
USA 20.5683
UK 3.54221
Japan 2.54001
China 2.50897
Germany 2.05816
.
.
Desired output file:
USA 20.57
UK 3.54
Japan 2.54
China 2.51
Germany 2.06
.
. (2 Replies)
Discussion started by: perl_beginner
2 Replies
3. UNIX for Dummies Questions & Answers
Dear all,
I have a file call test.txt which has 2000 columns, 1000 rows. If I want to trim all the columns to 3 decimal places, how can I do it? I know how to use awk prinf to trim specic columns. But I don't know how to trim all the columns. Thank you.
data sample:
0.976004565 9.34567845... (6 Replies)
Discussion started by: forevertl
6 Replies
4. Shell Programming and Scripting
Hi,
I have one input file which is delimited by pipe. I want to put decimal points in this input file at particular position in particular column and also get the negative sign (if any) at start of that column.
$ cat Input_file.txt
11|10102693|1|20151202|10263204|20151127|N|0001... (7 Replies)
Discussion started by: Prathmesh
7 Replies
5. UNIX for Dummies Questions & Answers
Dear all,
I have a data test.txt as below.
X22.30799720_T cg03868770 -0.5645412582127 2.4084685750406e-175
X22.30781182_A cg03868770 -0.5620426397492 3.5818034129169e-172
X22.30780724_C cg03868770 -0.5616890165605 2.9765569717858e-168
what I want is:
X22.30799720_T cg03868770... (3 Replies)
Discussion started by: forevertl
3 Replies
6. Shell Programming and Scripting
I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file.
Here is the file.
<!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies
7. Shell Programming and Scripting
Hi All,
I have problem in the middle of implementing to users, whereby the complaint is all about the decimal place which is too long. I need two decimal places only, but the outcome from command is always fixed to 6.
See the sample :
before:
Sort Total
Site Sort SortName Parts ... (3 Replies)
Discussion started by: horsepower
3 Replies
8. Shell Programming and Scripting
Hi Guys,
I am unable to return a decimal value from a function to the main script.
I am getting the correct value in the function but when it is returning to the main script using "return" it is coming as 0. Below is my code.
read VALUE_V fun_FATHERID fun_SONID fun_TOPID fun_RTYPE <... (2 Replies)
Discussion started by: mac4rfree
2 Replies
9. Shell Programming and Scripting
If I cat a file
And want to go to the first instance of a particular value - what command would I use?
And then from that point where I jumped to search for another value - but only search from that point forward not before the file?
Thanks~ (2 Replies)
Discussion started by: llsmr777
2 Replies
10. Shell Programming and Scripting
i am trying to add numbers with decimal place and I am prompted with an error.
this expr command works
:add=`expr 1 + 1`
:echo $add
:2
but when i am trying to add
:addThis=`expr 1.1 + 1`
:expr: An integer value was expected.
is there a way to add numbers with decimal place in UNIX? (4 Replies)
Discussion started by: tads98
4 Replies