Assigning curl output to variable only gives last line
Why does my shell script choke on whitespace or other special characters?
Importing only certain rows between spreadsheet documents Document 1 has many rows of data.  How do I import into document 2 only those rows that have a certain value in column C? Execute a script upon logout/reboot/shutdown in Ubuntu I'd like to run a .sh file using bash on logout and shutdown of Ubuntu. I have searched up and down the web and have found only fixes for KDE and GNOME. The script is simple, I just need to know if I can add the line of code to the "logoff/shutdown" file or if I need to reference it in another script. Class teardown in junit 3? Can I read and write to the same file in Linux without overwriting it? Syncing folders outside Dropbox using Symbolic Links and Junctions I've been reading a lot of information on this and yet I'm still unsure if its possible.  What I want to achieve is: sync a folder that is outside Dropbox and any changed to that folder or the files within get mirrored to the Dropbox folder and the Dropbox server.  This is what I've tried: I've install Link Shell Extension. Picked a folder with 10 pictures inside and created a junction for it inside the Dropbox folder. When I delete a pictures from inside the original folder (outside Dropbox) the change is reflected in the Junction folder inside Dropbox Folder, not on the server.  The exact same behaviour with the Symbolic Link option.  If I manually select Pause Syncing from Dropbox system tray icon and then Resume syncing = it uploads the changes to the server.  I know I can move all my files inside Dropbox folder and create the junctions/symlinks at their original locations but I want to do it the other way around.  Also what is the difference between choosing the Junction and Symbolic Link Option in regards to a folder?  Thank you. Question  Let $X_n\geq 0$ be independent for $n\geq 1$. The following are equivalent.  $\sum_{n=1}^\infty X_n&lt;\infty$ a.s. $\sum_{n=1}^\infty[P(X_n&gt;1)+E(X_nI(X_n\leq 1)]&lt;\infty$ $\sum_{n=1}^\infty E(X_n/(1+X_n))&lt;\infty$   My attempt I was able to prove $(1)$ implies $(2)$ and $(2)$ implies $(3)$ but not $(3)$ implies $(1)$. For $(1)$ implies $(2)$, observe that by Borel-Cantelli $\sum_{n=1}^\infty P(X_n&gt;1)&lt;\infty$, else $X_n&gt;1$ infinitely often w.p.1 so that $(1)$ is violated. To see that $\sum_{n=1}^\infty E(X_nI(X_n\leq 1)]&lt;\infty$, apply Kolmogorov three-series theorem (I think). For $(2)$ implies $(3)$ we can write that $$ \begin{align} \frac{X_n}{1+X_n}&amp; =\frac{X_n}{1+X_n}I(X_n\leq 1)+\frac{X_n}{1+X_n}I(X_n&gt;1)\\ &amp;\leq X_nI(X_n\leq 1)+ I(X_n&gt;1). \end{align} $$ Now take the expectation of both sides and sum on $n$ using $(2)$ to conclude $(3)$. For the last implication $(3)$ implies $(1)$, I tried to use Kolmogorov three series theorem. To this end put $Y_n=X_nI(X_n\leq 1)$. First note that $\sum_{n=1}^\infty P(X_n&gt;1)&lt;\infty$ since $$ P(X_n&gt;1)\leq P\left(\frac{X_n}{1+X_n}&gt;\frac{1}{2}\right)\leq 2E\frac{X_n}{1+X_n} $$ by Markov's inequality. But I am unable to show that $\sum EY_n&lt;\infty$ and $\sum\text{Var}(Y_n)&lt;\infty$. Any help is appreciated. What is "it" in the following sentence: It is clear that Bob likes doughnuts How can I tell what year my bike was made? My computer wont shutdown If I try to shutdown my computer it simply takes me back to the login-screen. I looked around and found :  Type in terminal:   sudo gedit /etc/default/grub Find the line: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" Change this to:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi=force" Save the file and close the file.  Finally, in terminal: sudo update-grub   But now there is a new problem when I try step 5 it says:  *myname*@ubuntu:~$ sudo update-grub [sudo] password for *myname*:  /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?). *myname*@ubuntu:~$    I am new whit linux and dont know what to do. How do the comment replies (aka &quot;pinging users&quot;) work?  Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about &quot;pinging&quot; another user?  Related: I am doing an animation. The images I have attached show 2 different render layer view node results.    Image one shows a cube on layer 1, and 2 icosphere on layer 2. I have layer 2 set to fast blur. I have to use transparent film and therefore I use the Alpha over nodes in composition.  Image two shows a cube and 1 icosphere. Image 1 should not be showing 2 icospheres, as the left most one is behind the cube.    Image 2 is from the same render result, and is correcting showing only 1 icosphere. However, that icosphere should be blurred as it is on layer 2. It seems for whatever reason I can not have both the correct composition effect and also have every object's visibility render correctly. I can only either have everything work fine, with no composition, or composition with every emission object showing through every other object in the scene.   I am aware that masks would solve this problem, but because of the complicated setup of object materials and particles, masking produces these very strange and suddenly appearing artifacts. Material Indexing also produces odd artifacts and does not consistently effect the appropriate materials.   This is also a new problem, I did not have this issue in the last blender version. So, material indexing is out, masking is out, object indexing is out.       I want to use the compositor to blur certain layers, but every emission object in the scene shows through. It shows through as though it was on x-ray, regardless if it is behind another or inside another object. The first image is an example of this, the left icosphere is behind the cube, and should not be visible. That is the problem. Why is it visible when it shouldn't be? I have found film reels some with tails of film others not. Is there a way of telling if they have been exposed/used in a camera? Film types are for 35mm and one Kodak Advantix. Suspend broken on Ubuntu 16.04 LTS, Dell XPS 9350 Since I upgraded from Ubuntu 15.10 to Ubuntu 16.04 LTS on my Dell XPS 9350, suspend is broken. When closing my lid the laptop will suspend, but resuming fails and it reboots. I tried pm-suspend and tried resuming, resuming failed and the laptop rebooted. I got the following errors when I got back into Ubuntu. The odd thing in my opinion is that it claims the kernel is not an official ubuntu package. Either way my Linux knowledge is not sufficient to know what's going wrong here.      EDIT: I just tried installing kernel 4.4.8 which should fix some things, but it did not fix this problem. By now I also tried 4.4.9 and 4.6 RC7. None of them fixed it for me. php--glob for searching directories and .jpg only Filesystem owner changed by mistake I ran this command on my ubuntu 12.04 by mistake:  chown someuser / -R   On RHEL it would be fixed by this command:  rpm --setugids -a   Is there anyway to fix it in ubuntu server? Why won't Amanita move in and settle down? I keep getting an alert that Amanita would like to settle down. I have a house ready for them however they still won't move in. Who is this NPC and why won't they settle down? Where, in the Windows 7 file system, are the taskbar shortcuts stored (per user)? How to show wifi password? Squeezing all the SEO out of a URL as possible I am working on an ecommerce site, I told our SEO consultant that I plan to make the URL scheme: /products/&lt;id&gt;/&lt;name&gt;. This is similar to Stackoverflow's URLs which are /questions/&lt;id&gt;/&lt;title&gt;.  He asked me if I could change the URL scheme to /p/&lt;id&gt;/&lt;name&gt; instead. I know why he wants this change, the word "products" isn't needed to find the correct product, and it doesn't offer any SEO, so shortening it to just p would make the relevant keywords in the &lt;name&gt; weigh more.  His main priority is maximizing SEO, but the part that I don't think he is considering is how this effects the semantics of the site. Also having the word "products" looks like it has meaning and a reason for being there, just having a p looks chaotic and ugly to me. I also don't think it makes that much of a difference does it? Stackoverflow doesn't use /q/&lt;id&gt;/&lt;title&gt; and they do just fine, I do realize that theres many factors at play here though, not just the URL.  So I want some outside opinions on which is the better way and why? Identical creatures entering the battlefield If I have two cards called  in hand and I play my first, Sin Collector (A). I use its triggered ability.   "When Sin Collector enters the battlefield, target opponent reveals his or her hand. You choose an instant or sorcery card from it and exile that card."  Now, I play Sin Collector (B), I use B's triggered ability.  But now my question. Does Sin Collector (A)'s ability trigger again as well? 'Sin Collector' entered the battlefield again, right?