How can I save the output of this command into a var and still remove the files?  rm -vri files | wc -l
I want to assign the result of an expression (i.e., the output from a command) to a variable and then manipulate it – for example, concatenate it with a string, then echo it.  Here's what I've got: #!/bin/bash cd ~/Desktop; thefile= ls -t -U | grep -m 1 &quot;Screen Shot&quot;; echo &quot;Most recent screenshot is: &quot;$thefile;  But that outputs: Screen Shot 2011-07-03 at 1.55.43 PM.png Most recent screenshot is:   So, it looks like that isn't getting assigned to $thefile, and is being printed as it's executed. What am I missing?
Making an elastic waistband on clothing? Is it correct to write $\Bbb E[X]$ or $\Bbb E_{\theta}[X]$? Suppose that we observe the discrete random variable $ X = (X_1, \dotsc , X_n)$ with state space S, whose distribution we do not know but we are assuming that its joint p.m.f. belongs to a known family $\{f_θ : θ ∈ Θ\}$. We derive a sufficient statistic $T(X)$.  Is it correct to write $\Bbb E[X]$? If not, why? Would it be more correct to write $\Bbb E_{\theta}[X]$? How can i get currency symbols from currency code in iphone? How do I separate hydraulic disc brake pads after pulling the brake while the wheel is off? I know what a set is. I have no idea what a class is.   As best as I can make out, every set is also a class, but a class can be "larger" than any set (a so-called "proper class").  This obviously makes no sense whatsoever, since sets are of unlimited size. It's not like you get up to 25 elements and go "oh, hey, sets are limited to a maximum of 20 elements, so we'll have to call this 25-element thing something else".  Does anybody know what the actual difference between a set and a class is?  Several people have pointed out that you can write paradoxes which involve sets. I get that. But where do classes come into the picture? Can the manual and tome magic items that increase stats be used multiple times by bypassing the century wait time via the spell Sequester? Assume we have a Wizard who is at least level 13 and can reliably cast  many times (either through acquired spell scrolls, or has acquired enough material components for it to be a non-issue), has a safe place (through the spell ) to be under the influence of Sequester for many centuries, and has access to the Manual of Bodily Health, Manual of Gainful Exercise, Manual of Quickness of Action, Tome of Clear Thought, Tome of Leadership and Influence, and Tome of Understanding.  Per the item descriptions in the DMG:     ...your [STAT] score increases by 2, as does your maximum for that score. The manual then loses its magic, but regains it in a century.   Now, normally this would be a once-in-a-lifetime use, or maybe twice (due to the lifespan of the races), but if a wizard used Sequester on themself, many years can pass without growing older:     ...[willing target creature] falls into a state of suspended animation. Time ceases to flow for it, and it doesn't grow older. You can set a condition for the spell to end [before the spell is dispelled by the caster].   So, assuming that time continues to flow for the magic items, but not for the sequestered wizard, can they study these books and take the necessary long rests, Sequester for a hundred years,  “wake” from the Sequester, and then repeat an arbitrary-but-finite number of times for an arbitrarily high (but finite) improvement to their stats?  To end the cycle and escape the demiplane, the wizard would simply Plane Shift out:     ...You can specify a target destination in general terms ... and you appear in or near that destination. Why is a black hole black? What's the best way to write subsequences?  $x_n_i$ gives an error, while $x_{n_{i}}$ works, but it just looks like $x_{ni}$ (the i isn't lowered enough below the n)... What are Extension Tubes? What are Extension Tubes? How can I make an object follow a path exactly I want to make this sphere follow a path, but everything I try creates a giant distance from the actual path. I guess what I'm asking is how do I get the blue line extending from the path to the sphere to be basically 0 at all times? Tag links in tag excerpts not shown properly If a tag excerpt contains a link to another tag with the [tag:foobar] syntax, this link is not properly shown in every context. For an example see . The link is shown as [tag:school-libraries] but it should be  or at least "school-libraries". Add leading zeroes to number in Java? Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something)  static String intToString(int num, int digits) {     StringBuffer s = new StringBuffer(digits);     int zeroes = digits - (int) (Math.log(num) / Math.log(10)) - 1;      for (int i = 0; i &lt; zeroes; i++) {         s.append(0);     }     return s.append(num).toString(); } Charge controller for Li-ion or Li-Polymer battery I am trying to work out the good charger for Mobile phones, which can serve as good performer for various smart phones out there in market these days &amp; mostly using Li-ion battery. Charging has 4 stages -- "the initial trickle-charging, then constant current charging, then constant voltage charging &amp; finaly Top-up charge" -- all this is controlled &amp; monitored by a control circuit/IC of charger. So, my concern is if such circuit/module/IC is already there in Mobile phones &amp; taking care of all protections to battery/phone including overheating during charge OR The charger designer have to incorporate these circuits in Charger itself? If former case, that means we just need to make a charging source giving ample current &amp; 4.75V-5.25V voltage, like a high-powered USB output port would gives. My feeling is such stages-wise charging &amp; control/monitor circuitry is already within the phone set, i just want to reconfirm. When the site is in read-only mode, I get a message like this:     This site is currently in read-only mode.   Would it be possible to update that message to provide links to these resources on SE's status:   : Official SE tweets on SE's status. : Official blog posts on SE's status. Updated Ubuntu 16.04, now I'm running Kali? Updated Ubuntu 16.04 today using the software updater. Now my PC is running Kali? There were something like 2Gb of updates, which I thought at first was because I haven't updated in a while. Now I'm thinking that it was downloading Kali. Here's a  of the new boot-up process.  The screen will continue to flicker for another 30 seconds or so, then stop flickering leaving the text on the screen. I tried switching the display manager from gdm to lightdm, which will boot me straight to the console and without flickering, but still no desktop.  I'm not altogether sure how I managed to accomplish this. It must have been when I was trying to get Katoolin running.  Any tips as to how I can either get the desktop or revert the updates?  Contents of cat /etc/lsb-rolling:  DISTRIB_ID=Kali DISTRIB_RELEASE=kali-rolling DISTRIB_CODENAME=kali-rolling DISTRIB_DESCRIPTION="Kali GNU/Linux Rolling" How can I display the current branch and folder path in terminal? How much weigh can a torque carry? I have a servo motor with a torque of 10kgcm. My question is how much weight can it carry? I really don't understand "kgcm." Is there a way to calculate how much weight can a motor carry? Calling a Java method with no name What is the most efficient way to deep clone an object in JavaScript? What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists. I can't use the terminal while gedit command is running