I'm rewriting some 20+ year old Unix scripts and I want the output to go to the screen and a file. I know this is possible with tee. Is there a similar command that stacks new lines on top, at the beginning of a file? I'd like the file to be output in reverse chronological order.  The script output will redirect to a WWW folder. For remotely viewing the output, I want to F5 in a browser and have new lines at the top of the browser window. I'll recycle the file (cp log log_$(date '+%Y%m%d') &amp;&amp; cp /dev/null log) everyday to keep it from growing too large.  I was hoping tee had a complimentary utility like cat has with tac, but alas no luck.
I want to insert text at the top of an already existing file. How can I achieve this. I tried echo and tee but was not successful.  I was trying to insert repo line at the top of sources.list file from terminal.  Note  I need an one line quick solution, because another answer's method was known to me already
Can someone please confirm the following? I have a C1/D visa. I worked as a flight attendant (currently unemployed) and entered the US numerous times, and also visited Mexico in December 2017.  I am planning on visiting Mexico again for 3 weeks in due course. Will the C1/D allow for me to transit in the US and visit Mexico or do I need a B1/B2 visa? I had issues with CBP before as it seems to be a very grey area.  According to the Mexican Consulate in South Africa, the type of visa is irrelevant. As long as it is multiple-entry, I am good to go.  Can someone please confirm, as I cannot get a solid answer from anyone?  Thank you! C++ catching all exceptions Let $\left| {{a_{ii}}} \right| > \sum\limits_{i \ne j} {\left| {{a_{ij}}} \right|} $.Why does $A$ is nonsingular? . I want to power my DIY stuff with a MacBook Pro USB C charger. The label on a charger says that it can provide three different power profiles:    20.2V - 4.3A 9V - 3A 5.2V - 2.4A   There is a ton of information about what USB-C power distribution is capable of, but I can't find any examples of how exactly to do it.   Is there an easy way or workaround to request one of those power profiles without using a microcontroller?  For example, I got apple MacBook Pro charger, apple USB-C cable, and a breakout board like this one: What is a word that means "someone who pretends to be your friend but is actually your enemy?" Filter dict to contain only certain keys? Syntax error due to using a reserved word as a table or column name in MySQL Can't mount an IDE HDD - "can't read superblock" error message I'm trying to mount my HDD,  /dev/sdb, which is connected via an enclosure but every time I try do so I get an error message   mount: /dev/sdb: can't read superblock   How do I solve this problem and mount my HDD? How to find number of prime numbers between two integers I have two integers, x and y so that x &lt; y. How many prime numbers are there between x and y (exclusive). Is there a formula or algorithm to compute? Counter ions and charge of a complex how can I add the charge and the counter ions to my complex? I'm using chemfig.  \schemestart \chemname{\chemleft[\chemfig{Ni (&lt;:[1]OH_2) (-[2]OH_2) (&lt;:[3]OH_2) (&lt;[5]OH_2) (-[6]OH_2) (&lt;[7]OH_2) }\chemright]}{\ce{[Ni(OH2)6]Cl2}} \schemestop     Thanks! Why isn't temperature frame dependent? In (non-relativistic) classical physics, if the temperature of an object is proportional to the average kinetic energy ${1 \over 2} m\overline {v^{2}}$of its particles (or molecules), then shouldn't that temperature depend on the frame of reference - since $\overline {v^{2}}$ will be different in different frames?  (I.e. In the lab frame  $K_l = {1 \over 2} m\overline {v^{2}} $, but in a frame moving with velocity $u$ relative to the lab frame, $K_u =  {1 \over 2} m \overline {(v+u)^{2}}$). This is problem 31b) from Dummit and Foote chapter 14.2. I am looking for a hint on how to attack the problem, since I have been thinking about it for a couple of hours but I don't even know where to start. The problem says:  Let $K$ be a finite extension of $F$ of degree $n$. Let $\alpha$ be an element of $K$. Prove that the minimal polynomial for $\alpha$ over $F$ is the same as the minimal polynomial for the linear transformation $T_{\alpha}$. In this problem, $T_{\alpha}$ is an $F$-linear transformation of $K$ that arises from $\alpha$ acting by left multiplication on $K$.  I appreciate any helpful suggestions on how to start attacking the problem or any possible hint. Thanks! Show that if $u$ is harmonic in $\mathbb R^n$ and $u=o(|x|)$, then $u$ is a constant.(Hint: use the solid version of the mean value property $u(x)=\frac{1}{\omega R^n} \int _{B_{R(x)}} u(y)dy$, and estimate $|u(x)-u(x')|$.)  Can anyone tell me how to use this hint? How to show bibliography alphabetically with biblatex? How do I handle partially correct edits in the Suggested Edits review queue? Contradicting Instructions While going through the suggested edits review queue, one sometimes stumbles upon partially useful edits like . Trying to follow the instructions listed in the descriptions doesn't lead to a conclusive answer. Considering our example:   Approve edits that clearly improve the post ↳ No, not *clearly* Improve Edit when you can make additional improvements to the post ↳ I most definitively can Reject and Edit to replace an ineffective edit with your own substantive changes ↳ It is ineffective in the sense that it made the post worse overall (imho) Reject edits that fail to improve the post or that make it worse ↳ Like the last option: yes Skip if you are not sure and want to go to the next suggested edit ↳ Well, yes. But that is really why I am here, asking this question   Reasoning about the remaining Choices This leaves us with three choices: Improve Edit, Reject and Edit and Reject (the last one slightly modified):  Improve Edit  + Acknowledges that some things in the edit where correct - Learning effect for author might vanish, as the improvement might get overlooked - Can't leave a custom message for edit author (except in comments, which pollutes the thread) - Doesn't trigger the system which &quot;punishes&quot; users who repeatedly have their edits rejected - Rewards the edit author with reputation for a poor edit   Reject and Edit  + Clearly shows the author that there were problems with the edit - Still can't leave a custom message explaining the problems of the original post. - One has to partially redo parts of the edit that have just been rejected, which might feel unjust to the original editor   Reject with a custom note and come back immediately to make a good Edit  + Clearly shows the author that there were problems with the edit + Possibility to leave an explanation as to what was wrong with the edit - One still has to redo parts of the edit that has just been rejected - Seems to be a weird workaround for Reject and Edit   Something else?   Each of the three options come with their distinct advantages/disadvantages making it non trivial to decide which one to pick.  Or does the answer simply depend on the quality of the edit? Like:  Improve Edit for subjectively slightly positive edits Reject and Edit (Or Reject and Edit) for subjectively slightly negative edits Are there any distinct finite simple groups with the same order? In finite group theory, it's often quite easy to show that there are no simple groups of a given order $n$.  My question is different: is there some natural number $n$ such that there are two non-isomorphic simple groups of order $n$?  The two easiest families of finite simple groups - $\mathbb{Z}_p$ for $p$ a prime and $A_n$ for $n\ge5$ - clearly don't yield any examples.    It should be possible to check this using the , but I don't know enough about the fabled 'sixteen infinite families of groups of Lie type' to do the check myself.  Also, if the answer is 'no', I'd be much more interested to see an elementary(ish) proof than I would be to see a proof that relies on over 3,000 pages of non-stop hard group theory. I'm using an unsigned repo in Ubuntu 16.04 from Debian multimedia:  deb http://www.deb-multimedia.org jessie main   To install deb-multimedia-keyring, I'm running:  apt-get update &amp;&amp; apt-get install deb-multimedia-keyring -y   This gives an error:  W: GPG error: http://www.deb-multimedia.org jessie InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 5C808C2B65558117 E: The repository 'http://www.deb-multimedia.org jessie InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. Conditional Expectation of Composite Function Preliminaries  Let $(\Omega, \mathcal{G}, \mathbb{P})$ be a complete probability space.  Let $D$ be a complete, separable, metrizable topological space with Borel $\sigma$-algebra $\mathcal{B}(D)$ (such as $D = \mathbb{R}^q$ with $\sigma$-algebra $\mathcal{B}(D) = \mathcal{B}(\mathbb{R}^d)$).  Let $\mathbb{R}$ be equipped with its canonical Borel $\sigma$-algebra $\mathcal{B}(\mathbb{R})$.  Let $g: \Omega \times D \rightarrow \mathbb{R}$ be a bounded $(\mathcal{G} \otimes \mathcal{B}(D) ) / \mathcal{B}(\mathbb{R})$-measurable function.  Let $\Pi: \Omega \rightarrow D$ be a $\mathcal{G}/\mathcal{B}(D)$-measurable random variable.  Let $H : \Omega \rightarrow \mathbb{R}$ be a $\mathcal{G}/\mathcal{B}(\mathbb{R})$-measurable random variable, defined by $$ H(\omega) := g(\omega, \Pi(\omega)).$$ Note, that, since $g$ is bounded, we have $H \in \mathcal{L}^2(\Omega, \mathcal{G}, \mathbb{P})$.  Let $j: D \rightarrow \mathcal{L}^2(\Omega, \mathcal{G}, \mathbb{P}) $ be defined by $$ j(\pi)(\omega) := g(\omega, \pi)  $$  For all $\pi \in D$, let $j(\pi)$ be independent of $\Pi$.  Question  I am interested in the conditional expectation $$\mathbb{E}[H \mid \Pi] :\Omega \rightarrow \mathbb{R}$$ of $H$ with respect to $\Pi$. More specifically, I suspect that (a $\mathbb{P}$-unique version of) this condititional expectation is given by  $$ \mathbb{E}[H \mid \Pi] (\omega) = \mathbb{E}[j(\Pi(\omega))], \quad (\dagger)  $$ whereby $\mathbb{E}[j(\Pi(\omega))]$ can of course also be written as $$\mathbb{E}[j(\Pi(\omega))] = \int_{\Omega} j(\Pi(\omega))(\tilde{\omega}) d\mathbb{P}(\tilde{\omega}) . $$  How can I prove, that $(\dagger)$ is the case? I have tried, tracking the definition of conditional expectation and using Fubini, but with little success so far.  Thanks for any advice! Ideals in valuation rings How do I prove the fact that for any valuation ring $V$ the ideals are totally ordered under inclusion? Error on \usepackage {geometry} text property The following produces error! The error is solved if no space exists between text= and {5in,8in}. This is really weird! Why is this happening with LaTeX?  \documentclass[a4paper,10pt,onecolumn,oneside, portrait]{article}  \usepackage[text= {5in,8in},centering]{geometry}  \begin{document}      \section{What Endogenous uncertainty is:}  yes  \subsection{Type as it is : Stochastic and determ! } on  \subsubsection{Well there is more than it} Yes    \end{document}