How to get sum of values in column based on variables in other column separately? I have a table data like below  abc 1   1   1 bcd 2   2   4 bcd 12  23  3 cde 3   5   5 cde 3   4   5 cde 14  2   25   I want the sum of values in each column based on variables in first column and desired result is like below:  abc 1   1   1 bcd 14  25  7 cde 20  11  35   I used awk command like this  awk -F"\t" '{for(n=2;n&lt;=NF; ++n)a[$1]+=$n}END{for(i in a ) print i, a[i] }' tablefilepath   and I got a result below:  abc 3 bcd 46 cde 66   I think the end of my code is wrong but don't know how to fix it. I need some directions to fix the code.
How to calculate the sum of the data that have the same ID in the first column? I want to sum the values of the rows of my data that have the same ID in the first column. My data looks like   data.txt  Id    a    b    c    d    e 1     1    2    3    4    5 1     2    3    4    5    6 1     3    4    5    6    7 2     4    5    6    7    8 2     5    6    7    8    9 2     6    7    8    9    10 3     7    8    9   10    11 3     8    9    10  11    12 3     9    10   11  12    13 3     10   11   12  13    14 4     11   12   13  14    15 4     12   13   14  15    16 5     13   14   15  16    17 5     14   15   16  17    18   Required results  out.txt  Id    a     b   c   d   e 1     6     9   12  15  18 2     15    18  21  24  27 3     34    38  42  46  50 4     23    25  27  29  31 5     27    29  31  33  35
How to Disable USB Auto-mount I use VirtualBox on my MBP and often need to mount my USB flash drive inside the guest.  The problem I'm running into is that the host OS (OS X Mavericks) immediately mounts the USB flash drive when I insert it.  When I try to unmount it (gracefully, through Finder), OS X complains that the device is in use.  Further research into lsof reveals that Spotlight and AVG are doing their thing with the flash drive.  Rather than fiddling with individual app settings, I'd like to just modify the host OS behavior so that the USB device doesn't auto-mount.  Any suggestions? Shape gets distorted when adding stroke in Illustrator CS6 I very recently started learning how to use Adobe Illustrator (CS6), and just now I noticed something strange. When I add a 1pt stroke to my shape, it gets slightly distorted. This distortion does not disappear if I remove the stroke. (But only if I remove the stroke by setting its weight to 0. Using CTRL+Z does return the shape to its former state.)  After adding and removing the stroke a few times, the difference becomes quite noticable:   Am I doing something wrong? Is it a bug? I can't imagine this being the expected behaviour.  EDIT: I think I figured it out. Appearantly, turning 'Align to pixel grid' off doesn't affect previous shapes. If I turn it off and then recreate my shape from scratch, the problem is fixed.   However, I was wondering if their is a way to disable the effect for existing shapes. In other words, can I 'fix' the shapes I created while 'Align to pixel grid' was still on? Are console games locked to a certain region? I'm going on a vacation from Europe to the US and was planning of bringing along some Xbox360 or PS3 games, but now I'm curious if they will be compatible with my European Xbox.  In that past there would be a clear difference between NTSC and PAL games, but is this still the case with the current gen of consoles? Perl - Package/Module Issues A complete residue system from an arithmetic progression I'm solving a problem, and the solution makes the following statement: "The common difference of the arithmetic sequence 106, 116, 126, ..., 996 is relatively prime to 3. Therefore, given any three consecutive terms, exactly one of them is divisible by 3." Why is this statement true? Where does it come from? Is it generalizable to other numbers? Kill the [bugs] tag? Move EFI System Partition to another drive Does a monk's Unarmored Movement speed increase apply to the fly speed gained from a Fly spell? I downloaded a file from the internet (I can link to it here, but in the interests of not annoying other users, I won't post the link), and I can't delete the file with the message:   You need permission to perform this action  You require permission from the computer's administrator to make changes to this file   Trouble is, I am the administrator and UAC is completely off.  If I go into the Properties/Security tab, I get the message   You do not have permission to view or edit this object's permission settings   Clicking "Advanced"/Owner, it says:   Current owner: Unable to display current owner.   If i try to change the owner, I get the same message:   Unable to set new owner on file  Access is denied. when does a functor map products into products? Assuming $T_1$ is the force that acts on box $1$ and $T_2$ is the force that acts on box $2$.  Exactly what causes the Tension? Why does $T_1 = T_2$?  The problem is we are told to memorize that $T_1 = T_2$ for mass less ropes, but I do not understand why, especially in an Atwoods machine.  When I think about it, I know it has something to do with the force $m_2g$ which causes the box with mass $m_1$ to rise, and vice versa.  But I cannot apply physics terminology to this, or really understand whats going on. I am using Apache Felix and its Declarative Services (SCR) to wire the service dependencies between bundles.  For example, if I need access to a java.util.Dictionary I can say the following to have SCR provide one:  /** * @scr.reference name=properties interface=java.util.Dictionary */  protected void bindProperties(Dictionary d) { }  protected void unbindProperties(Dictionary d) { }   Now, I have more than one Dictionary service available, and I want to filter them using the "name" service property (I only want "name=myDictionary"). I can do that with code (using a ServiceTracker), but I'd rather specify the filter in the @scr annotation instead. What should be the default title case for non-technical questions? As an example, this question is titled using sentence case. I've been going to lots of different meta sites (especially this one), and I think the needle bent on my oh-me-oh-my-my-ocd-oh-meter.  Can we please standardize on using either:   Sentence case Title Case AP Style Title Case   ... and then we can look at just converting titles automatically? This would be a switch, of course, but I'd only imagine turning it off on sites where program code or symbols might be present in titles. Or, it could just become part of editing guidelines.    Additionally, is this a horrible idea?   To see the differences between them, you can put any arbitrary title into  (we have no affiliation with them, it's just a tool I sometimes recommend to people).  We would also eventually adopt this for static routes, but I'm mostly talking about questions. Installing from source - do I need to keep the extracted tarball directory If I'm installing from source, do I need to keep the extracted tarball directory?  So if I download the git tarball. I then do:  tar -xvzf git.tar.gz   This will create a git.x.x. directory, into which I cd, then run ./configure etc. Once I'm done with this process, and git, or whatever is installed, do I need to keep the original git.x.x extracted directory, or is that just used for compiling the program?  I'm somewhat confused by all the directories, and folders used for programs. There are 11 letters in the word.   M - 1 I - 4 S - 4 P - 2  so the number of different permutations is $\dfrac{11!}{1! 4 !4!2!}$  Is this correct solution? Why are my Cycles settings missing? so I'm working on a little bathroom scene and wanted to make a clay render. I started looking for the material override which I kinda knew where it was and on the way I switched my render engine accidently to workbench instead of cycles. Switched to cycles all my seetings on the render tab are missing except color management and free style. Hows that? I restarted blender multiple times and tried some other stuff but nothing changed a thing, and I'd rather avoid a new installation Proving that expression is equivalent to the definition of derivative Let $f$ be differentiable at $x=a$.   Prove that if $x_n \to a^+$ and $y_n \to a^-$ then:  $$\lim_{n\to \infty} \frac{f(x_n)-f(y_n)}{x_n-y_n}=f'(a).$$  Every option that I think about seems to my very trivial, so I believe that I am doing something wrong.  Both numerator and denominator approach zero as $n\to\infty$ as the case of the formal definition of derivative, but it isn't guaranteed that the limits are equal (“$\frac{0}{0}$”).   Any direction? 401k withdrawal abroad and state taxation? From what I know about 401k's, when it's time to retire, we take our 401k money and pay federal and state tax. Some states don't have taxes on 401k's — Florida is a good example. So many people move to Florida for a retirement, not to pay taxes (that's why people call it heaven's waiting room). The question is - how does it work if a US citizen permanently moves to another country for a retirement (retaining citizenship, but not living in any of the US states)? Are there any state taxes? If yes, then why? What does the red background on an item mean? With the latest update, you can now use gyms like stops and get items. So far, every time I have done so there has always been one item that has a red background and number.    Is this a bonus item since I am part of red team? Is there any special meaning to it at all? Disable chat migration notification if one of the users has insufficient rep? Simple request, really.  Can we add a detection for the     Please avoid extended discussions in   comments. Would you like to   automatically move this discussion to   chat?   prompt, so that if one of the users in the "extended discussion" has under 20 rep it doesn't appear?  I think a lot of the users this apply to will have low rep and it may take some back and forth to get good info out of them.  New suggestion: how about if a sufficiently high-rep user is clicking on the link, the low-rep user gets a field promotion sufficient to chat? Low-rep users are particularly prone to post questions to lead in this direction of needing to move to chat.