I want to add the following to the file /etc/securetty using sed:  pts/0 pts/1 pts/2 pts/3 pts/4 pts/5 pts/6 pts/7 pts/8 pts/9   I wrote the following command for this purpose:  sed -i '$a pts/0\\npts/1\\npts/2\\npts/3\\npts/4\\npts/5\\npts/6\\npts/7\\npts/8\\npts/9' /etc/securetty   which gives me the output:  pts/0\npts/1\npts/2\npts/3\npts/4\npts/5\npts/6\npts/7\npts/8\npts/9   I'm clearly missing out on something here. What could be wrong in my sed command?
I am writing a bash script to look for a file if it doesn't exist then create it and append this to it:  Host localhost     ForwardAgent yes   So "line then new line 'tab' then text" I think its a sensitive format.  I know you can do this:  cat temp.txt &gt;&gt; data.txt   But it seems weird since its two lines. Is there a way to append that in this format:  echo "hello" &gt;&gt; greetings.txt
How can I pass a command line argument into a shell script? I know that shell scripts just run commands as if they were executed in at the command prompt.  I'd like to be able to run shell scripts as if they were functions... That is, taking an input value or string into the script.  How do I approach doing this? Properties of $x_k=\frac{a_{k+1}-a_{k}}{a_{k+1}}$ where $\{a_n\}$ is unbounded, strictly increasing sequence of positive reals Let $\{a_n\}$ be an unbounded, strictly increasing sequence of positive real numbers and let $x_k=\frac{a_{k+1}-a_{k}}{a_{k+1}}$. Which of the following statements is/are correct? (CSIR NET December 2014)         For all $n\geq m, \sum\limits^{n}_{k=m}x_k&gt;1-\bf{\frac{a_m}{a_n}}$   There exist $n\geq m, \sum\limits^{n}_{k=m}x_k&gt;\frac{1}{2}$      My attempt:  Analysing question in light of $a_k=k\implies x_k=\frac{k+1-k}{k+1}=\frac1{k+1}$, I feel both are correct, I doubt if  I can generalise the result in light of this one example.   Any way to prove that this true for general case?    Note: Please do not confuse  with my question. The first two options are different, I've marked the difference in bold. I have a simple cylinder which is mirrored on both the X and Y axis.  When I scale it along the X axis, the two halves of the cylinder overlap, rather than scale as it would before the mirror modifier was applied:    I haven't used Blender in a while and I know this is a simple fix. Is this an instance of Priori Incantatem? During the climax of Fantastic Beasts and Where to Find Them, Tina briefly duels with Graves and their wands appear to lock with each other (see picture). I believe this also happens some other times in the later Harry Potter films other than Harry and Voldemort's duel in the graveyard during Goblet of Fire.    We know that this is definitely a case of Priori Incantatem for the graveyard duel in Goblet of Fire, as the wands are locked for a sufficient amount of time for past spells to begin showing themselves (significantly, showing the people Voldemort had murdered), but is this the case for the other instances of wands locking? If so, does that mean there are a lot more wands out there with shared cores, as it was my understanding this could only happen if that criteria was satisfied? Can you raise $\pi$ to a real power to make it rational? I have filed my 2012 tax return jointly with my wife, along with my wife's ITIN application, back in late March.  In April, I got a letter for IRS ITIN department saying that we should send my wife's original passport to them. So we sent my wife's passport on May 15th. USPS tracking number confirmed that IRS received it on May 20th.  However, last week (end of June) we have received another letter from IRS ITIN department saying that our ITIN application has been rejected, rejected because we have not sent the original identification document that they requested!  Okay, let's put our tax return and ITIN aside. Where is my wife's passport? Right now my wife does not have her personal identification, nor proof of legal status in U.S. Could IRS have lost it?  I tried to call the IRS several times. One time I waited for 1 hour and 20 minutes to talk to a person, and that person said he has only 10 minutes to talk before he has to leave. He said they'll investigate and someone(?) will call us back soon, but never called back. I wrote them a letter, but no response. I tried calling several times more, but machine is saying 'sorry too many calls right now, we can't accept your call'.  What can I do? Why is it "If I were you" and not "If I was you"? Photon energy - momentum in matter Does Microsoft Office 2010 have version control?  In other words, does it automatically save old versions of files? I'm new to Linux and Ubuntu. People keep using ~/filename in their answers to my questions. What does ~/ mean? What happens to the Matrix if Neo takes the blue pill? If Neo defies his fate and refuses to be removed from the Matrix (by taking the blue pill) what happens next?   Would another "The One" get selected by The Architect or The Oracle and is there anything to suggest that the current instance of The Matrix actually could have multiple "The One"'s (perhaps one of the 'potentials') in the event that the Chosen One manages to get himself killed or simply refuses to play ball? How to efficiently animate 2D scene spanning sprites in Unity? Our game is a 2D point-and-click adventure game.  One of the levels is set in a factory with conveyor belts that span the scene.  The game is hand animated in 2D and so animating these conveyor belts could potentially take up lots of memory since the sprites are as long as the screen (it's an HD game - 1920 x 1080). I'm not sure if tiled sprite shapes can be animated, so I was wondering if there's a prescribed way to handle larger sprite animation like this - efficiently. How can I run scripts automatically when Ubuntu starts up so I don't have to run them manually after startup? Checking if file is checked out through CSOM Why doesn't logging out of Stack Overflow log me out of Gmail? Why does logging in to Stack Overflow keep me signed in to my Gmail email after logging out and regardless of the Stay signed in checkbox?  Steps to reproduce:   Browse to  and confirm you are logged out Browse to  and confirm you are logged out Click login Click Google Enter Email/Password and confirm Stay signed in is unchecked Click Sign in Click logout (up top) Click Logout (down below) Browse to  and confirm you are still logged in Click Sign out &lt;- Shouldn't clicking Logout on Stack Overflow be doing the same thing as this? Browse to  and confirm you are logged out     Answers are making sense but my frustration is that clicking Logout (twice) on StackOverflow essentially does nothing. If I proceed to click login and Gmail I am immediately authenticated because I still have an active Gmail cookie. In order to effectively logout I need to click Logout twice on Stack Overflow and then manually browse to  and Sign out. Derivation of E step in EM algorithm While im going through the derivation of E step in EM algorithm for pLSA, i came across the following derivation . Could anyone explain me how the following step is derived.   $\sum_z q(z) log \frac{P(X|z,\theta)P(z|\theta)}{q(z)}  = \sum_z q(z) log \frac{P(z|X,\theta)P(X,\theta)}{q(z)} $ Difference between a gerund acting as subject and an infinitive acting as a subject? I am wondering whether there is any difference between a gerund acting as subject and an infinitive acting as a subject. Trying to put a footnote in subsection title:  \subsection{Effect of Lateral Confinement on SW Band Structure\footnote{Parts of this sub--section are based on \citet{Venkat2013}}}   produces the following error:  Argument of \@sect has an extra } ...section are based on \citet{Venkat2013}}}   I am using:   \documentclass[paper=A4, fontsize=12, toc=listof, toc=index, toc=bib]{scrreprt}   Please advise. There are a couple of different ways to remove HTML tags from an NSString in Cocoa.   is to render the string into an NSAttributedString and then grab the rendered text.   is to use NSXMLDocument's -objectByApplyingXSLTString method to apply an XSLT transform that does it.  Unfortunately, the iPhone doesn't support NSAttributedString or NSXMLDocument. There are too many edge cases and malformed HTML documents for me to feel comfortable using regex or NSScanner. Does anyone have a solution to this?  One suggestion has been to simply look for opening and closing tag characters, this method won't work except for very trivial cases.   For example these cases (from the Perl Cookbook chapter on the same subject) would break this method:  &lt;IMG SRC = "foo.gif" ALT = "A &gt; B"&gt;  &lt;!-- &lt;A comment&gt; --&gt;  &lt;script&gt;if (a&lt;b &amp;&amp; a&gt;c)&lt;/script&gt;  &lt;![INCLUDE CDATA [ &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ]]&gt; Surface of genus $g$ does not retract to circle (Hatcher exercise)