05-05-2011
Is there a simpler way?
Hi, Thank yuo very much for writing the script. I am wondering if there is a simple way since I new for unix. Is there a way that I could convert the scientific notio0n to decimal? Then I could deal with the data using awk as normal.
Thanks,
Lin
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
nawk -F "|" 'FNR==NR {a=$2 OFS $3 OFS $4 OFS $5 OFS $6;next}\
{if ($5 in a)print $1,"test",$5,a, $2,$3,$4 OFS OFS OFS OFS OFS OFS OFS OFS $2-$3-$4 ; \
else print $1,"Database",$5 OFS OFS OFS OFS OFS OFS $2,$3,$4 OFS OFS OFS OFS OFS OFS OFS OFS $2-$3-$4 }' OFS="|" \
file1 file2 > file3
This... (5 Replies)
Discussion started by: pinnacle
5 Replies
2. Shell Programming and Scripting
Hi All,
Please let me know if it is possible to convert data from ASCII to Packed Decimal through Unix?
Basically we have ASCII file with numeric data we want to convert that files data to Packed decimal format to send it to main frame.
Please let me know if we can do it through unix script.... (1 Reply)
Discussion started by: aloktiwary
1 Replies
3. Shell Programming and Scripting
Assoc.txt
CHR SNP BP A1 TEST NMISS OR STAT P
1 rs2980319 766985 A ADD 4154 1.024 0.1623 0.8711
1 rs2980319 766985 A AGECAT 4154 1.371 6.806 1.003e-11
1 ... (6 Replies)
Discussion started by: genehunter
6 Replies
4. UNIX for Dummies Questions & Answers
hi guys,
i have a data with a column of p value (normal format and scientific combined). i want to creat a subset of data which only contains p-value:
data 1: p<10^7
data 2: p<0.01
how should i do it? many thanks!
data looks like:
rs7841347 128887490 1.695e-007
rs1241347 ... (4 Replies)
Discussion started by: forevertl
4 Replies
5. Shell Programming and Scripting
hello folks,
I have few values in a log which are in scientific notation.
I am trying to convert into actual decimal format or integer but couldn't able to convert.
Values in scientific notation:
1.1662986666666665E-4
2.0946799999999998E-4
3.0741333333333333E-6
5.599999999999999E-7... (2 Replies)
Discussion started by: scriptscript
2 Replies
6. Shell Programming and Scripting
Hi everybody!
I try to printout a csv-file with the exeption of cell $1 and $4.
what i tried so far:
awk '{for(i = 1; i<=NF; i++);if(i == 1 || i == 4);else print($i)}' file.csv
..any ideas how it work and why my example fails?
Thanks in advance!
IMPe (3 Replies)
Discussion started by: IMPe
3 Replies
7. Shell Programming and Scripting
have written a combined sed+awk to perform a lookup operation which works but looking to enhance it.
looking to match a record using any of the comma separated values + return selected fields from the record - including the field header. so:
cat foo
make,model,engine,trim,value... (6 Replies)
Discussion started by: jack.bauer
6 Replies
8. UNIX for Dummies Questions & Answers
Dear all,
I have a txt file with only one column which contains p values. My data looks like this:
5.04726976606584e-190
2.94065711152402e-189
2.94065711152402e-189
9.19932135717279e-176
1.09472516659859e-170
1.24974648916809e-170
0.1223974648916
0.9874974648916
...
what I want... (2 Replies)
Discussion started by: forevertl
2 Replies
9. Shell Programming and Scripting
Input file:
data1 0.05
data2 1e-14
data1 1e-330
data2 1e-14
data5 2e-60
data5 2e-150
data1 4e-9
Desired output:
data2 1e-14
data1 1e-330
data2 1e-14
data5 2e-60
data5 2e-150
I would like to filter out those result that column 2 is less than 1e-10.
Command try: (1 Reply)
Discussion started by: cpp_beginner
1 Replies
10. Shell Programming and Scripting
I have 133 .txt files in a directory that I am combining into 1 file. The problem is when I use awk or cat to combine the files I get out put like this:
output
85 138662360 KCNT1
86 138662962 KCNT1
82 138657053 KCNT1
83 138657635 KCNT1
95 138646881 KCNT1... (12 Replies)
Discussion started by: cmccabe
12 Replies
LEARN ABOUT HPUX
hppaccvad
hppac(3X) hppac(3X)
NAME
hppac: HPPACADDD(), HPPACCMPD(), HPPACCVAD(), HPPACCVBD(), HPPACCVDA(), HPPACCVDB(), HPPACDIVD(), HPPACLONGDIVD(), HPPACMPYD(), HPPAC-
NSLD(), HPPACSLD(), HPPACSRD(), HPPACSUBD() - HP 3000-mode packed-decimal library
SYNOPSIS
DESCRIPTION
This set of calls invokes the library functions for emulating 3000-mode (MPE V/E) packed-decimal operations. These functions are in
library which is searched when the option is used with or ld(1).
Performs packed-decimal addition.
Compares two packed-decimal numbers.
Converts an ASCII representation to packed-decimal.
Converts a binary representation to packed-decimal.
Converts a packed-decimal number to ASCII.
Converts a packed-decimal number to binary.
Performs packed-decimal division.
Performs packed-decimal division (alternate routine).
Performs packed-decimal multiplication.
Performs a packed-decimal normalizing left shift.
Performs a packed-decimal left shift.
Performs a packed-decimal right shift.
Performs packed-decimal subtraction.
For all operations, the value returned in the variable to which the compcode argument points is one of the following values of type
Result > 0 or operand1 > operand2
Result < 0 or operand1 < operand2
Result == 0 or operand1 == operand2
For all operations, the value returned in the variable to which the pacstatus argument points is one of the following values of type Their
meanings are intended to be obvious:
AUTHOR
The HPPAC library was developed by HP.
SEE ALSO
PA-RISC Systems Only hppac(3X)