I am running a batch script and outputting the info to a file in the temp folder, (just to learn from). I have an input for a user to select which mapped drive they want their data transferred out of. Here is what I have, it is super easy so I can learn then modify later. Cls @ECHO Off Net use &gt; c:\Temp\Map.txt Net Use Pause :Start  ECHO Which Drive letter do you want to back up? ECHO ? - Enter Drive letter ECHO E - Exit SET /P M=Make Choice then press ENTER: IF %M%==E Exit Else goto :here If %M%==e Exit Else goto :here  :Here Echo %M% Findstr &quot;OK           %M%:&quot; c:\Temp\Map.txt pause  What I need is to extract the path name for the drive they select. Like if there are 5 drives, and they want drive S: backed up, output is: OK           S:        \\10.X.X.X\Deployment\David\Davids_Scripts\bats  I would need the \\10.52.8.1\Deployment\David\Davids_Scripts\bats saved so I can put it in a transfer script.
I'm looking to get the result of a command as a variable in a Windows batch script (see  for the bash scripting equivalent).  A solution that will work in a .bat file is preferred, but other common windows scripting solutions are also welcome.
Getting an "Authentication token manipulation" error when trying to change my user password I am logging in to my Ubuntu Server using my username. Once I am logged in I am typing passwd command. Entering a new password but a second after getting following error messages:  passwd: Authentication token manipulation error passwd: password unchanged   What is wrong here? How can I change my password otherwise if I don't have access to that server physically, i.e. I am connecting remotely with ssh using terminal. By definition a matrix representing a Lorentz transformation is orthogonal, so that its inverse is equal to its transpose.   Consider a pure boost in the t-x plane; $$\Lambda_x=\begin{pmatrix} \cosh(\gamma) &amp;&amp; \sinh(\gamma) &amp;&amp; 0 &amp;&amp; 0\\ \sinh(\gamma) &amp;&amp; \cosh(\gamma) &amp;&amp; 0 &amp;&amp; 0\\ 0 &amp;&amp; 0 &amp;&amp; 1 &amp;&amp; 0\\ 0&amp;&amp;0&amp;&amp;0&amp;&amp;1 \end{pmatrix}.$$ $\Lambda_x$ has inverse  $$\Lambda_x^{-1}=\begin{pmatrix} \cosh(\gamma) &amp;&amp; -\sinh(\gamma) &amp;&amp; 0&amp;&amp;0\\ -\sinh(\gamma) &amp;&amp; \cosh(\gamma) &amp;&amp; 0&amp;&amp;0\\ 0 &amp;&amp; 0 &amp;&amp; 1 &amp;&amp;0\\ 0&amp;&amp;0&amp;&amp;0&amp;&amp;1 \end{pmatrix}$$ but tranpose  $$\Lambda_x^T=\begin{pmatrix} \cosh(\gamma) &amp;&amp; \sinh(\gamma) &amp;&amp; 0&amp;&amp;0\\ \sinh(\gamma) &amp;&amp; \cosh(\gamma) &amp;&amp; 0&amp;&amp;0\\ 0 &amp;&amp; 0 &amp;&amp; 1&amp;&amp;0\\ 0&amp;&amp;0&amp;&amp;0&amp;&amp;1 \end{pmatrix}.$$ These are not equal. Where have I gone wrong? Man clones himself to have the clone do things he doesn't enjoy I read a short story about four years ago and can't remember the title or author. The only thing I know is that it is relatively old -- like Huxley or Asimov era. Can anyone help me?   The basic synopsis is this: a man clones himself and has his clone do the parts of his life that he doesn't enjoy. He deceives his wife about this; she doesn't know he has a clone. Whenever the man and the clone are both home, the clone is locked in the "toolbox" in the basement. The clone starts to treat the man's wife better than he had previously. His wife starts to fall in love the clone, and the man decides he needs to get rid of the clone. When he tries to do so, the clone overpowers the man and locks him in the toolbox in the basement!  I'm hoping to share this story with my English class this school year. Any help is appreciated! Is there an implicit default constructor in C++? In the book I'm reading at the moment () it says that if you don't declare a default constructor for a class, the compiler supplies one for you, which "zeroes out each data member". I've experimented with this, and I'm not seeing any zeroing -out behaviour. I also can't find anything that mentions this on Google. Is this just an error or a quirk of a specific compiler? How can I explain to a non-native why the plural of a noun isn't used adjectivally? How can I explain to a non-native speaker that while this is correct:     The felling of trees.    And this is also correct:     tree felling   This is not:     *trees felling   To a non-native it seems very reasonable that since many trees are being felled and given that the felling of trees uses the plural, the inverse form would also use the plural and become trees felling.  To a native speaker such as myself, the latter is very obviously wrong, but I couldn't figure out how to formalize this into a rule that a non-native can understand. Will acceleration rate of expansion of space become faster than speed of light? Proving that $-a=(-1)\cdot a$ As the title reveals, I want to prove (based on the axioms of field) that $$-a=(-1)\cdot a$$ I've been trying for a while now, but couldn't think of a way to do it and it got me thinking that maybe its does not require a proof, but it doesn't feel right. Any ideas? I'm trying to install Lubuntu on my laptop (sorta old 2005). [Laptop stats: Intel® Celeron® CPU 410 @ 1.46 GHz 1.47GHz, 448 MB of RAM]  I press Install and this message appears:   This kernel requires an x86-64 CPU, but only detected an i686 CPU.  Unable to boot - please use a kernel appropriate for your CPU.   What can I do to install Lubuntu on my computer? How does conservation work in wormholes? My questions might seem naive as I haven't plunged into the mathematical descriptions, but wormholes are interesting even if I don't actually know them :)  First of all, is wormhole making two possible paths betwwen points (like the tunnel in most visualisations) or is it just making two points beside each other like in the game Portal? Of course, second case can be bent into a tunnel, but there would be nothing special about tunnel part and no preferred way to divide into "normal" and "tunnel" part of spacetime.  My main questions are these:   Is momentum conserved? Is kinetic energy conserved? How does potential energy work?   To elaborate... In the game Portal you can fall into floor and fly out of the wall or floor elsewhere with the same speed, but another direction (normal to the portal). So momentum is not conserved, but kinetic energy is. Is that how it would actually work? Where does the momentum go then?  And does it really allow you to increase your potential energy while retaining kinetic? It would seem fair to take away some kinetic energy if you are put in a region where you have more potential energy.  Either way is the change in energy non-continuous like in the game and discussion that's linked below? Or are there just more than one way to move through but the change in potential energy is smooth in any of those? That would mean more potential equilibrium points though...  Similar questions has been discussed , is it correct about how the falling guys gets a lot of energy (in form of a potential one) by draining it from the mouths? Node access based on view mode How to distribute proprietary Mathematica code I'm looking for a high current DC switch (able to switch something like 5V@30A) and I've encountered several DPDT that might do what I need, however they are only rated for AC applications (3A@250VAC or 6A@125VAC). Are these rating convertible to DC? or is that something that only the facturarer would know? I just want to know if my proof to this question is correct. First, I proved it was true for $n = 4$. $$4!&gt;2^4$$ $$24&gt;16$$ Then, I assumed that it was true for $n=k$. $$k!&gt;2^k$$ Afterwards, I tried to prove it for $n=k+1$. $$(k+1)!&gt;2^{k+1}$$ $$(k+1)k!&gt;(2)(2^k)$$ Since $k!&gt;2^k$, am I allowed to simply do $$(k+1)(2^k)&gt;(2)(2^k)$$ $$(k+1)&gt;2$$ and this is true for all $k\geq3$. Would the last two steps be illegal because I only assumed that $k!&gt;2^k$ is true? How do you teleport a certain player to spawn after they win a 1v1 I managed a KitPvP server in Minecraft and everything works fine except when players wants to duel each other. They get sent to a room where they will be dueling. The main problem is when the winner wins, I have no idea how to teleport them back to spawn. GRUB does not detect Windows I have finally installed Ubuntu on my second drive. When I start my computer GRUB only offers me to boot Ubuntu, not Windows 7. What needs to be done so that I can choose between Ubuntu and Windows in GRUB?  When I press F12 for boot menu at startup and I choose Windows Boot Manager it boots into Windows 7.    I ran command sudo fdisk -l and here is log ():  WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.   Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xc3ffc3ff     Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  1953525167   976762583+  ee  GPT Partition 1 does not start on physical sector boundary. Is anti-gravity (i.e. repulsive gravity) possible in theoretical physics? Is  (i.e. repulsive gravity) possible in string theory?  I have read some articles about scientists making assumptions about the existence of anti-gravity, but is it possible in string theory? Hyperref "enquotes" metadata Real Size Image Printing I just want to write a script which changes my directory.  I put the below commands in the file /home/alex/pathABC  #!/bin/sh cd /home/alex/Documents/A/B/C echo HelloWorld   I did   chmod +x pathABC   In the Terminal, while in /home/alex, I ran ./pathABC, but the output is just HelloWorld and the current directory is not changed.  So what is wrong? How do you setup a TeX document to self publish a book online? I am a casual TeX user. Mostly I have used it to type up some reports/homeworks for class in my graduate engineering work. In the past I have used document type "article". And then kept all the defaults.  I need to self publish something online. At the highest level I would like to know: How do you setup a TeX document to self publish a book online?  Some more low level questions:   Is there a document type for "book" and what is its name? I am looking at Amazon Createspace. : filetype=pdf, trim size, margins (gutter and outside margins). All of these various trim size, margins gutter/outside can be adjusted in the Tex document?   Has anyone seen any good TeX templates for Amazon Createspace? If you could demonstrate how to tweak a specific "book" document type that would be very helpful also.    Other than the above questions, please feel free to offer any other sort of help since I am completely new to this process (advice, links to good tutorials, links to wikibooks).