10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
i want to use this Linux-script on a Solaris System to check the fragmentation Level of ZFS-DataSets:
#!/bin/sh
zdb -ddddd ${1} | awk --non-decimal-data \
'
/Indirect blocks/ {
file_number++;
next_block = 0;
}
/L0/ {
split($3, fields, ":");
this_block =... (10 Replies)
Discussion started by: Ragesm
10 Replies
2. 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
3. Programming
Hi ,
seq can be 0...128
int windex = seq / 8;
int bindex = seq % 8;
unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue = bitvalue;
This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to... (1 Reply)
Discussion started by: greenworld123
1 Replies
4. Shell Programming and Scripting
Hi All,
Can some one help me in identifying the significance of character "$" ,Which is playing critical role in matching decimal point numbers as below.
$ echo "01#.01"|awk '{if ($0 ~ /^+(\.*)?$/) print}'
$ echo "01#.01"|awk '{if ($0 ~ /^+(\.*)?/) print}'
01#.01
$
Regards,
Rmkganesh. (3 Replies)
Discussion started by: rmkganesh
3 Replies
5. Shell Programming and Scripting
Hi
I am executing below command to do summation on 46th coloumn.
cat File1| awk -F"|" '{p += $46} END { printf"Column Name | SUM | " p}'
I am getting output as
Column Name | SUM | 1.01139e+10
Here I want output in Proper decimal format. Can someone tell me what change is required for same? (1 Reply)
Discussion started by: sanranad
1 Replies
6. Shell Programming and Scripting
Hey guys,
I've got an awk string that does a simple calculation which works well. However, I'd really like to be able to strip the decimal point and the trailing ints from it - any ideas on how I'd change the awk string to be able to do that ? I've changed it countless times and each time it... (14 Replies)
Discussion started by: jimbob01
14 Replies
7. UNIX for Dummies Questions & Answers
Dea all,
I have a question. I have a column of numbers with scientific notion and decimal combined data. I want to print it only if the number <0.05 using awk. however the very small numbers with scientific notion is not selected. Do any one know how to solve it? Thanks! example as below: ... (4 Replies)
Discussion started by: forevertl
4 Replies
8. Shell Programming and Scripting
i have a script in which awk prints "($2-1700)/10000"
and the answer is -0.07,but i want the answer in 4 decimal places.
that is -0.0700.
How can i sue awk to get my results in four decimal places (4 Replies)
Discussion started by: tomjones
4 Replies
9. Shell Programming and Scripting
Hi
Running a specific nawk statement over a 17m lines files returns the following:
/bin/nawk: not enough args in .....
input record number 1,25955e+06, file test.1
source line number 1
I'd like to report the line number (in bold above) in decimal not floating so that i can spot it out.
... (1 Reply)
Discussion started by: moutaye
1 Replies
10. Solaris
Hi
Running a specific nawk statement over a 17m lines files returns the following:
/bin/nawk: not enough args in .....
input record number 1,25955e+06, file test.1
source line number 1
I'd like to report the line number (in bold above) in decimal not floating so that i can spot it out.
... (1 Reply)
Discussion started by: moutaye
1 Replies