Search Results

Search: Posts Made By: RJ17
22,199
Posted By RJ17
Jim, thanks for all your help. Here is the...
Jim, thanks for all your help.
Here is the final awk code I am using. It is subject to rounding errors but it is close enough for my needs.


awk -F',' '{ sum=0; sumsq=0;
for(i=1; i<=NF;i++)...
22,199
Posted By RJ17
This awk code throws the following error. awk:...
This awk code throws the following error.
awk: The sqrt parameter to a math library function is not in the domain.

This means that the portion to find the average works fine but because sqrt...
22,199
Posted By RJ17
Ok. Can anyone help me rewrite my above script...
Ok. Can anyone help me rewrite my above script into awk or perl. awk would be preferred? Thanks.
22,199
Posted By RJ17
Script for finding standard deviation
I have a CSV file that looks like

0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0
10,11,7,0,4,12,2,3,7,0,11,3,12,4,0,5,5,4,5,0,8,6,12,0,9,3,3,0,2,7,8...
8,792
Posted By RJ17
Here is what I have so far. The problem is I...
Here is what I have so far. The problem is I can't get the square root. Also none of my math functions give me floating point numbers but that is a secondary problem.


for i in `cat file.csv...
8,792
Posted By RJ17
Ok, so my last post wasn't very well thought out....
Ok, so my last post wasn't very well thought out. I need to be able to find the std deviation of each row. The awk resources I have found seem indicate how to do this on each column, but not each...
8,792
Posted By RJ17
See next post
See next post
8,792
Posted By RJ17
I figured out the reason things weren't working. ...
I figured out the reason things weren't working. I was using a excel file that was saved as a csv. Therefore it was not a unix file. When I converted the file to a unix file things worked fine. ...
8,792
Posted By RJ17
I get the exact same result using this script as...
I get the exact same result using this script as I do when i run the command recommended by danmero.
8,792
Posted By RJ17
Here is a copy paste of my putty session. It...
Here is a copy paste of my putty session. It isn't working like yours and I dont know why. Maybe you can see something. I am unable to check the versions on the server. What about using the append...
8,792
Posted By RJ17
avronius, Thanks for your help, I really need...
avronius,
Thanks for your help, I really need a unix script not perl. Perl is a really last resort. If I can't get a unix command that works I will look into using perl in my script. I have...
8,792
Posted By RJ17
It does work the when I use the echo command on...
It does work the when I use the echo command on just the one line but when I run it on my entire csv file it shows
,10,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0...
8,792
Posted By RJ17
danmero, Thanks for the help. It is possible...
danmero,
Thanks for the help. It is possible to add the 10 to the end of the line instead of the beginning. This line of code converts...
8,792
Posted By RJ17
Unix Script to parse a CSV
I am writing a unix script that will parse a CSV and edit the values. My CSV looks like this
0,0,0,0,1,0,1,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0...
Showing results 1 to 14 of 14

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