10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I want to perform a mathematical operation on column. Can anyone please help?
Here is the sample of operation to be performed:
123 996 100
123 996 200
123 996 200 2015-09-21
123 996 100
123 996 200
123 996 100
What I want is to multiple all values of column # 3 by 100 and... (3 Replies)
Discussion started by: Zaib
3 Replies
2. Shell Programming and Scripting
Hi
cat test.txt
H|123|341|567|asfg
D|dfg|trtyy|errt
D|ert|frty|wer
Here I need to replace the third column value with 100 of the first record only and while printing I need to print the full file content also..I am expecting a result like this
H|123|100|567|asfg
D|dfg|trtyy|errt... (3 Replies)
Discussion started by: saj
3 Replies
3. Shell Programming and Scripting
Dear All,
I have a data file input.csv like below. (Only five column shown here for example.)
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
3,2,4,5,6
5,3,5,5,6
From this I want the below output
Data1,StepNo,Data2,Data3,Data4
2,1,3,4,5
3,1,5,6,7
where the second column... (4 Replies)
Discussion started by: ks_reddy
4 Replies
4. Shell Programming and Scripting
Trying to do math while using awk and if statements.
awk 'BEGIN {FS = ":"} ;
{if($2=1) {$3 +=};
print "Total employee work hours: " $3}' works_on.txt
The file format is
123456789:1:32.5
123456789:2:7.5
666884444:3:40.0
453453453:1:20.0
453453453:2:20.0
333445555:2:10.0 ... (6 Replies)
Discussion started by: Rapcher
6 Replies
5. Shell Programming and Scripting
I have a file like this
product qty1 qty2 value
cola 50 25 1
pepsi 100 75 2
muffin 25 30 0.5
would like to do the following operations with one line command
1) disply the line having "Qty1" greater than or equal to 50
2) display the line Qty1 - Qty2 ... (2 Replies)
Discussion started by: johnveslin
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a file with thousands of lines like this:
Chr1 477515 . ACCCC ACCC 17.7 . INDEL;DP=17;AF1=1;CI95=0.5,1;DP4=0,1,0,3;MQ=32;PV4=1,0.036,1,1
Chr1 481987 . A AAAT 62 . INDEL;DP=11;AF1=1;CI95=0.5,1;DP4=0,0,1,3;MQ=41
I want to make a file with... (2 Replies)
Discussion started by: fadista
2 Replies
7. Shell Programming and Scripting
I have two files having 3 coulms and 1 column respectively
file1.txt
0 22.89 35.60
10 22.80 35.61
20 22.70 35.63
30 22.32 35.68
50 19.23 35.79
75 16.10 35.59
100 15.00 35.52
125 14.45 35.46
150 13.91 35.41
200 12.94 35.28
... (7 Replies)
Discussion started by: shashi792
7 Replies
8. Shell Programming and Scripting
I have two files
file1
A 2 4 6 8
B 1 3 5 7
C 1 3 5 7
D 1 3 5 7
E 1 3 5 7
file2
C D E F G
H I J K L
I need to add field 1 of file1 to both field 2s of file2 and repeat the same on all the rows in... (2 Replies)
Discussion started by: cold_Que
2 Replies
9. Shell Programming and Scripting
Thanks...It was a spoiler for my Team... (5 Replies)
Discussion started by: Diggi
5 Replies
10. Shell Programming and Scripting
I want to append a file containing a list of names and the sorted contents of the file should be copied to a new file. All this should be on a single line( using pipes and redirection)
Pls help ..
thankyou (1 Reply)
Discussion started by: phiber_optik
1 Replies