10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Need help in coding:
File with several rows incl. numbers like
1 2 3 4
5 6 7 8
...
How can i build the sum of each row seperately?
10
26
...
Thx for help.
Please use CODE tags as required by forum rules! (13 Replies)
Discussion started by: smitty11
13 Replies
2. UNIX for Dummies Questions & Answers
Hi
I would like to know how can I multiply the value of column three to columns 4-end of file
example of input file:
rs1000012 AK8 2 0.05 0.05 1 0 0
rs10000154 PAQR3 0.01 2 1 2 2 1
Desired output file:
rs1000012 AK8 ... (1 Reply)
Discussion started by: fadista
1 Replies
3. UNIX for Dummies Questions & Answers
I have a spreadsheet of extremely long rows of numbers. I want to print only the last column. Tried using printf but there seems to be too many rows.
example:
3 100 34 7 23 0 8 ..... X
400 203 778 1 ..........Y
58 3 9 0 100 ..........Z
I only want to print X, Y and... (1 Reply)
Discussion started by: jimmyf
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
Trying to add a row of numbers. There are 24 number across. Would like to have column 25 sum each row.
10 3 45 49 0 24... Sum
3 200 3 9 1 3 ...... Sum
9 7 20 9 8 10 ...... Sum
Thank you. (5 Replies)
Discussion started by: jimmyf
5 Replies
5. Shell Programming and Scripting
Hi all,
I do have a tab delimited file
a1 a2 b1 b2 c1 c2 d1 d2 e1 e2 f1 f2
0 0 123 546 0 0 0 0 0 0 0 0
0 0 345 456 765 890 902 1003 0 0 0 0
534 768 0 0 0 0 0 0 0 0 0 0
0 0 0 0 456 765 0 0 0 0 0 0
0 0 0 0 0 0 12 102 0 0 0 0
456 578 789 1003 678 765 345 400 801 1003 134 765... (5 Replies)
Discussion started by: Lucky Ali
5 Replies
6. Shell Programming and Scripting
is there another way of doing the below:
echo "7 3 8 2 2 1 3 83.4 8.2 4 8 73 90.5" | bc
shell is bash. os is linux and sunos.
bc seems to have an issue with long range of numbers (12 Replies)
Discussion started by: SkySmart
12 Replies
7. Shell Programming and Scripting
I have some 100 files with extension .tmp The files are named as 1.tmp, 2.tmp, 3.tmp until 100.tmp
All files look like this:
0.38701788 1.968068e-02
0.38622013 2.054002e-02
0.38350296 1.715522e-02
0.38282126 1.781283e-02
0.38282126 1.781283e-02
0.35847232 1.026839e-02
0.3557739... (7 Replies)
Discussion started by: shoaibjameel123
7 Replies
8. Shell Programming and Scripting
Hi All,
I have tried few things with this but it did not help much.
I have some 200,000 files in a directory. There are two sets of files.
1. Files with extension .dat with file names like these (1.dat, 2.dat, 5.dat, 8.dat....200000.dat)
2. Another set of files with .txt extension and... (5 Replies)
Discussion started by: shoaibjameel123
5 Replies
9. Shell Programming and Scripting
File A
aa <space> --D--A--D---DDY---M--UM-M--MY
Another file
D3
M9
So output shud be
Here in FileA D which is 3 after removing dash
after we have counted dash D is position at 9
and for M is 23
final output will be
D9
M23 (2 Replies)
Discussion started by: cdfd123
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I'm need to do some addition and multiplication of scientific nottaion numbers, in the form 34.23423e-10 for example.
I was echoing the list of numbers to stdout, then using bc -l, then I find that this does not seem to work for numbers with exponential notation. Could someone help me out... (1 Reply)
Discussion started by: chugger06
1 Replies