How to capture "$?" before tee smashes it? I've got a test script that repeatedly builds a library under different configurations. It also tee's the output for postmortem failures:  $MAKE" static dynamic cryptest.exe 2&gt;&amp;1 | tee -a "$TEST_RESULTS" if [ "$?" -ne "0" ]; then     echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS" fi   The script is not working as intended because the test is capturing tee's return code, and not make's return code.  I looked at the man pages for tee(1), but I don't see an option to have it restore a return code.  How can I capture the return code from make before tee smashes it?
Get exit status of process that's piped to another I have two processes foo and bar, connected with a pipe:  $ foo | bar   bar always exits 0; I'm interested in the exit code of foo. Is there any way to get at it?
Why does the classical path give the dominant contribution in the path integral? When will data.SE get updated data? promised that data.SE would &quot;soon&quot; get live data:     I realize it's a long weekend, but given that data.SE is now over 2 months out of date, it would be nice if this was finally rolled out. I configured a journey in Marketing Cloud where i sent an email. My requirement is adding BCC email addresses to this email, but I noticed that we can only add valid email addresses. Could you confirm me that is not possible to add BCC /CC Address using personalization strings or Ampscript functions (e.g. Lookup) inside the Journey Email's settings? Writing function definition in header files in C++ I have a class which has many small functions. By small functions, I mean functions that doesn't do any processing but just return a literal value. Something like:  string Foo::method() const{     return "A"; }   I have created a header file "Foo.h" and source file "Foo.cpp". But since the function is very small, I am thinking about putting it in the header file itself. I have the following questions:   Is there any performance or other issues if I put these function definition in header file? I will have many functions like this. My understanding is when the compilation is done, compiler will expand the header file and place it where it is included. Is that correct? How to estimate camera sensor size? I am using a smartphone for capturing photos and I need to estimate the camera sensor size (mm*mm). I have the resolution (in pixels) and the focal length (in pixels). I can also measure the size of any stationary object and its distance w.r.t the lens. Basically, I don't have a pixel-to-mm metric for any of the above parameters that I can use. Is there any way I can calculate that to estimate sensor size? Add table row in jQuery How can a singularity in a black hole rotate if it's just a point? I guess nobody really knows the true nature of black holes, however, based on everything I know about black holes, there is a "singularity" at their center, which has finite mass but is infinitely small and thus infinitely dense.  So a black hole is really just a point mass that dramatically warps the space-time around it so that an event horizon is achieved.  What doesn't make sense to me is how a true mathematical "point" can rotate, or at least how it is even possible to determine if a point is rotating (or if it should even make a difference about whether or not it is rotating, for the same reason it would be impossible to tell if a perfect, featureless sphere were rotating (I know it would have higher rotational energy but lets assume you can't measure that because a true "point" can't attain rotational energy since it has no radius)).  The only conceptual solution I have to describe a rotating black hole would be to compare it to a rotating whirlpool, where the surface of the water is the fabric of space-time... but this is different because there is no "singularity" in a whirlpool that causes the water around it to rotate, whirlpools form from flow of water around a point (put into motion perhaps by some kid swirling water in a 2-liter bottle... it's due to an external cause), but the only thing that could cause rotation around a black hole would be the singularity itself, which doesn't make sense because, once again, how can we know if a true point is actually rotating?  Aside from everything I've said, here is what I am actually asking:  Why/how do some black holes rotate... what is the mechanism of their rotation (is analogous to a spinning point or a 3-d whirlpool, or something different)? Is there a nice solution to get a "presenter mode" for Latex presentations? Can any one help me with this?  Determine all integer triples $(x,y,z)$ such that $1 ≤ x ≤ y ≤ z$ and $x + y + z + xy + yz + xz = xyz − 1$.  I thought of Vieta's formula but don't let me lead you into a dead end. Optimization paramters read-only mysql 5.7 database? What's the best way to configure a MySQL database that is only read-only, and will never have any modifications made to it?  1) I have increased my innodb_buffer_pool_size to 70% of available RAM  2) Increase query cache size to 40mb  Running against a load generator, after some time the database starts bottlenecking to only 1000 statements per second.  The configuration is 2-cores, 8GB ram 50GB SSD. The database contains a single InnoDB 13 GB table with the same exact query running on two indexed columns.  We are using a vertx server to hit the database. The symptom we see is that the web service performance degrades after 15-20 minutes of heavy load.  Where can the bottleneck be? What parameters should we optimize? Sudo doesn't work on Aliases I have added alias ll='ls -la' in /etc/bash.bashrc but sudo ll is not working. Is there a way to "source" bash.bashrc? In a related post, another user suggesting creating an alias for sudo with a space after it. Eg. alias sudo='sudo ' but there wasn't any context to this answer. Should I add this to my bashrc? Seems hackish.  What is the correct method for adding an alias for my sudo one-off commands? I just installed Ubuntu 16.10 on my desktop and have a USB deathadder. The problem is I can't see where the cursor actually is because it appears only in the top left of my screen. The mouse still moves but the cursor graphic doesn't follow How to open nautilus without a desktop? I'm using xmonad, and I would like to open a nautilus window to a certain directory, because I like the convenience of browsing inside an encrypted zip file without unzipping it, which nautilus allows.   however, opening nautilus, even with a path argument starts a desktop on the monitor I'm using (There are 8 xmonad monitors) The desktop is inoperative and renders that monitor useless until nautilus is killed.  Is there any way to open just a nautilus window without any desktop starting? Vueling is currently experiencing , with many flights delayed by several hours. Assuming I'm at the airport and my flight is certainly delayed by more than 3 hours, can I simply book another flight and claim compensation later?  According to EU's :     In addition, if you are denied boarding, your flight is cancelled or arrives more than 3 hours late on arrival at the final destination stated on your ticket, you may be entitled to compensation of EUR 250 - 600, depending on the distance of the flight.   But it's not clear if I actually have to board the flight or if simply having a purchased ticket is sufficient. I presume it would be possible to negotiate with Vueling representatives at the airport, but I'd rather not wait in the inevitable 100-person line to their counter if I'm covered by EU law. Additional needed documents for UK trip if someone will shoulder all expenses Someone (a relative) from the UK (already a naturalized British Citizen) will be financing my trip, as well as taking care of my accommodation. What are the documents I need to submit aside from bank statements? Does the sponsor need to fill-out the Sponsorship Undertaking Form? ()  something to consider from my question: -my relative is a naturalized citizen in the UK. Is proof of naturalization needed? dimensional analysis of the Shannon-Hartley theorem In the infamous  the bandwidth of the channel is measured in Hz (Hertz) but the channel capacity is measured in bps (bits per second). So, either I'm missing something obvious or there's a dimensional mismatch in the equation.. Can somebody please help me understand? Show that $\frac{(2n)!!}{(2n+1)!!}$ converges. I'm going to university in October and thought I'd have a go at a few questions from one of their past papers. I have completed the majority of this question but I'm stuck on the very last part. In honesty I've been working on this paper a while now and I'm a bit tired so I'm probably giving up earlier than I usually would.  I won't write out the full question, only the last part:     Let $$S_r(n) = \sum_{m=0}^n\ (-1)^m m^r {n \choose m}$$ where r is a   non-negative integer . Show that $S_r(n)=0$ for $r&lt;n$. Evaluate   $S_n(n)$.   I have shown that $S_r(n)=0$ for $r&lt;n$ by taking $(1+z)^n= \sum_{m=0}^n\ z^m {n \choose m}$, letting $D_r(f(z))=z\frac d{dz}(z\frac d{dz}...(\frac d{dz}(f(z)))...)$ where $z\frac d{dz}$ is applied $r$ times and applied it to both sides.  The left hand side gives a polynomial, degree n which has factor $(1+z)$ for all $r&lt;n$ and the right hand side gives $\sum_{m=0}^n\ z^m (m)^r {n \choose m}$. Setting $z=-1$ yields the required result.   There is some build up to this, so I'm fairly certain that this was the intended method.  I'm stuck however on the very last part. I have tried finding a form for $D_r((1+z)^n)$, but I'm fairly sure that this isn't the correct approach, as the wording of the question implies that $S_n(n)$ needs to be considered separately.  I'm surprised that I didn't find that this question had already been asked, so apologies if it has been.  Thank you. How to print file content only if the first line matches a certain pattern? Why does jQuery or a DOM method such as getElementById not find the element?