I'm not sure if this should be here or over on AskDifferent, but I'm using a bash shell (iTerm) on MacOS. I sometimes have commands that produce additional commands that need to be copy/paste to the terminal.  An example of this is logging into the aws ecr:  aws ecr get-login --no-include-email --region -eu-west-1  This produces a multiline login hash that you need to copy and paste to the shell in order to successfully authenticate. Is there a way I can this and paste it from the keyboard or some command?  I've seen several ways to copy all of the output from a command to clipboard, but that's not exactly what I'm asking for. Specifically, I typically only want the last line in the output.  If nothing exists, I'd be perfectly happy with just setting up some sort of alias in my .bashrc  The recommended dupe answer expects you to use screen - I don't want to use screen
Shells have a useful feature where pressing the keyboard UP arrow replaces the contents of the current command line with the previous command that was entered. (And if you do it again, the command before that, and so on.)  I would like a similar feature, where pressing (some other button) replaces the contents of the current command line with the last line of output from the previous command (and if you do it again, the previous line of output , and so on.)  Is there any shell that provides a feature like this?  The motivation is that you often want to run a command, and then run another command with part of the previous commands's output as input. (No, I don't want to do anything involving piping the output of one command into the next. I'm looking for an interactive experience, where you run the first command, see its output, and then get a line of that output into your next command, without having to reach for the mouse to do a clumsy copy-and-paste.)
I'm running Apache2 in a docker container, and want to write nothing to the disk, writing logs to stdout and stderr. I've seen a few different ways to do this (,  ) but these seem like hacks. Is there no way to do this by default?   To be clear, I do not want to tail the log, since that will result in things being written to the disk in the container. Change cursor color after log out on ubuntu 18.04.2 LTS I've set my cursor color on gnome-tweaks to be DMZ-Black, which works fine when I log in and lock the computer. But, after I log out, the cursor color changes to white.  Is there a way to change the color of the cursor after log out?  My gnome-tweaks setting: Is my proof that $U_{pq}$ is not cyclic if $p$ and $q$ are distinct odd primes correct? Prove that $U_{pq}$ is not cyclic if $p$ and $q$ are distinct odd primes.   I am a self taught person. I just learned this and tried this on my own and came up with this.  $x \equiv 1 \pmod{p}$ and $x \equiv -1 \pmod{q}$ has a solution $[a]_{pq}$, since $p$ and $q$ are relatively prime. Because $q$ is an odd prime, $[-1]_{pq}$ is not a solution, so $[a]_{pq}\neq [-1]_{pq}$. But $a^2 \equiv 1 \pmod{p}$ and $a^2 \equiv 1 \pmod{q}$, so $a^2 \equiv 1\pmod{pq}$ since $p$ and $q$ are relatively prime, and thus $[a]_{pq}$ has order 2.  Can someone please tell me if this proof this correct? Please help with proof as I learned it just now as a self taught person. How should I use a possessive apostrophe when a name is between commas? How can I install a package without installing some dependencies? I'm trying to install the package LaTeXila, and the output looks like this:  $ sudo apt-get install latexila --no-install-recommends Reading package lists... Done Building dependency tree        Reading state information... Done The following extra packages will be installed:   latexila-data latexmk luatex tex-common texlive-base texlive-binaries   texlive-common texlive-doc-base texlive-latex-base Suggested packages:   rubber texlive-latex-extra debhelper Recommended packages:   texlive texlive-latex-recommended texlive-luatex lmodern   texlive-latex-base-doc The following NEW packages will be installed:   latexila latexila-data latexmk luatex tex-common texlive-base   texlive-binaries texlive-common texlive-doc-base texlive-latex-base 0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. Need to get 29.3 MB of archives. After this operation, 74.5 MB of additional disk space will be used. Do you want to continue [Y/n]?   I don't want to install the texlive packages. I've installed texlive manually from . Any suggestions? Merging two SQLite databases which both have junction tables The second part of an exercise asks that I show:     There does not exist a surjective bounded linear map from $\ell^2(\mathbf{N})$ to $\ell^1(\mathbf{N})$.     The first part was to show that these two spaces are separable in their respective $L^p$ norms.    I've really hit a wall on this one.  I know, in fact, that there does exist a surjective bounded linear map from $\ell^1(\mathbf{N})$ to $\ell^2(\mathbf{N})$.  So my intuition says that if there were also one going the other way, then the two spaces would have to be isomorphic, which is false .  But I don't know of any such theorem that I could apply to "the category of Banach spaces".    My only other idea is to argue by contradiction using the open mapping theorem, but nothing is coming to me...  My guess is that separability is also going to be important, given the first part of the exercise.  -Thanks. I am trying to include long URLs in a bibliography, but those often overflow into the margin of the document.  I have seen a number of questions about breaking URLs in bibliography, but after trying every solution, I have not found anything that completely solves my problem. There are apparently a number of ways to allow LaTeX to break line at different places in URLs. But in my case, even though LaTeX breaks line at some places, I still get overflow for some URLs.  Here is the code I am using:  \usepackage[hyphens]{url} \usepackage{hyperref} \hypersetup{breaklinks=true}  \urlstyle{same} \usepackage{cite}   and with these bibliography entries:  @misc(webrtc,     organization={W3C WebRTC Working Group},     title={WebRTC 1.0: Real-time Communication Between Browsers},     howpublished={\url{http://www.w3.org/TR/2012/WD-webrtc-20120821/}} )  @misc(android_javascriptinterface,     organization={Android Open Source project},     title={Android WebView addJavascriptInterface reference},     howpublished={\url{http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String)}} )   I'm getting this, for example:     The entry about Android overflows in the border: my column should end where you can read "browsers." on the first line or "http:" on the third line.  Edit: when trying to create a minimal example for my problem, I noticed that this only occurs when using the IEICE template file. You can find it here: , but if you do not want to have to extract the archive and locate the correct file, I have put it there also:   Here is my minimal example:  .tex file:  \documentclass[paper]{ieice}  \usepackage[hyphens]{url} \usepackage[hidelinks]{hyperref} \hypersetup{breaklinks=true} \urlstyle{same} \usepackage{cite}  \title{Test document} \begin{document}  this\cite{upnp_spec} is a test\cite{android_javascriptinterface}  \bibliographystyle{plain} \bibliography{refs_min}  \end{document}   and refs_min.bib file:  @misc(android_javascriptinterface,     organization={Android Open Source project},     title={Android WebView addJavascriptInterface reference},     howpublished={\url{http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface(java.lang.Object, java.lang.String)}} )  @misc(upnp_spec,     organization = {UPnP Forum},     title = {UPnP Device Architecture 1.1},     howpublished = {\url{http://upnp.org/specs/arch/UPnP-arch-DeviceArchitecture-v1.1.pdf}} )   Is there any way I can fix this ? Ubuntu 12.04 (Wubi) not starting - root.disk corrupted I have Ubuntu 12.04 installed through Wubi on my laptop. For some reason when i click on Ubuntu on start up (when you have to either select windows or Ubuntu) I get the following screen, the grub cursor keeps flashing.  Gnu grub version 1.99-21 Ubuntu 3.4   Minimal bash-like line editing is supported. For the first word, tab lists possible command completions. Anywhere else tab lists possible device or file completions.   grub&gt;   Could you tell me what I can do to fix this problem and to start Ubuntu normally? My primary server with SQL Server 2005 broke down, so I've started up the log-shipped database on the secondary server. The database is live on the secondary server, and I just need to remove the log shipping settings for it, while the primary server is no longer accessible.  It seems that the sp_delete_log_shipping_secondary_database stored procedure should be executed on the secondary server to do this, which "removes a secondary database and removes the local history and remote history", as it is stated on .  Would this also remove the database itself? Or only the log shipping settings for it? And what will it do when the primary server is not accessible?  I must not loose the database on the secondary server, as it is already in use. A shrinking map that is not a contraction no fixed point. Working from Munkres.  Show that $f: \mathbb{R}\to \mathbb{R}$ given by $f(x) = [x+\sqrt{(x^2+1)}]/2$ is a shrinking map that is not a contraction that has no fixed point.   I figured out the fixed point part but have no clue how to show the other part.  For the fixed point part $$f(x) = x \Leftrightarrow x = [x+\sqrt{(x^2+1)}]/2$$  then $$2x = x + \sqrt{(x^2+1)}$$ $$x = \sqrt{(x^2+1)}$$ $$ x^2 = x^2+1$$  Which is a contradiction.   Thanks in advance. Sphere intersection Stuck I have two spheres that are bounded by spheres for collision detection. I do not want them to intersect. My intersection works. But it gets stuck. Once the function returns true, I cannot get it out. I tried  collideBool = ObjectOne.Intersect(ObjectTwo);  if(collide == true) {     leftright = leftright;     updown = updown; } else { if(GetAsyncKeyState(VK_RIGHT)) leftright -= dt; if(GetAsyncKeyState(VK_LEFT)) leftright += dt; if(GetAsyncKeyState(VK_DOWN)) updown += dt; if(GetAsyncKeyState(VK_UP)) updown -= dt; }  collide = false;   My sphere gets stuck. What is a way around this? I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one? A "fast" way for  computing $ \prod \limits_{i=1}^{45}(1+\tan i^\circ) $? Which  is the fastest paper-pencil approach to compute the product $$ \prod  \limits_{i=1}^{45}(1+\tan i^\circ) $$ I have a Trek 3900 Mountain bike that had a serious creaking problem whenever I would pedal.  I found that the ring that holds the Shimano sealed bearing was really loose.  I tightened it up and it helped somewhat.  It loosened up again and I put loktite on the threads and really tightened it up but it is still creaking a little.  The bearing cartridge seems fine.  Any ideas? I think the single dashes (hyphens) should be placed between the numbers and units in this sentence:     ...in a cylinder of 3-inch radius and 24-inch length.   Is that correct and should hyphens be added to this second sentence?     ...making a trench nearly 15 feet wide and more than 30 feet long. Definite integral, quotient of logarithm and polynomial: $I(\lambda)=\int_0^{\infty}\frac{\ln ^2x}{x^2+\lambda x+\lambda ^2}\text{d}x$ why is my screen black after rdp connection? After connecting from my home via remote desktop, both my screens are black when I arrive at work. The only thing I can see is a mouse pointer on one of the screens. I then seem to have only two choices: rebooting or working from a remote desktop connection, which works fine.  It did happen every time I tried last week.  However, I did the same from my laptop in a meeting room today, and I didn't have any problem. PHP error in .xml file? Integration of secant $$\begin{align} \int \sec x \, dx  &amp;= \int \cos x \left(  \frac{1}{\cos^2x} \right)  \, dx \\ &amp;= \int \cos x \left(  \frac{1}{1-\sin^2x} \right) \, dx \\ &amp; = \int\cos x\cdot\frac{1}{1-\frac{1-\cos2x}{2}} \, dx \\ &amp;= \int \cos x \cdot\frac{2}{1+\cos2x} \, dx  \end{align}$$  I am stuck in here. Any help to integrate secant?