I have the following script named export.sh:  #!/bin/bash  SOURCE="${BASH_SOURCE[0]}" while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink   DIR="$( cd -P "$( dirname "$SOURCE" )" &amp;&amp; pwd )"   SOURCE="$(readlink "$SOURCE")"   [[ $SOURCE != /* ]] &amp;&amp; SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located done  SOURCE=$(dirname ${SOURCE})  export $(cat "${SOURCE}/../params.env" | xargs)   In some words what it does it to export enviromental variables from a file named params.env that is located by convention on the prarent folder and exports the contents as enviromental variables.  Sample contents of params.env file are:  SOMEVAR="val1" SOMEVAR2="val2"   And a successfull run will provide me SOMEVAR with value val1 and SOMEVAR2 with value val2 enviromental variables.    But if I run:  ./export.sh   And afterwards  printenv | grep SOMEVAR   It does not show that the enviromental variable is set.
I have multiple Amazon EC2 accounts and want to quickly be able to switch variables, such as $EC2_HOME, using a script.  I have have a shell script set up like this:  #!/bin/sh export EC2_HOME=/home/me/.ec2 echo $EC2_HOME   When I run the script I know that EC2_HOME is set, but I thought that using export would make the variable stick around after the script completed. It does not, as running echo $EC_HOME does not show anything.  I know this must be very rudimentary Linux scripting knowledge, but I don't know it. I tried looking for related questions without luck - so my apologies if this is a duplicate.
Reentering serial number in Windows 7 Does anyone know how to install a new serial on a working copy of Windows 7 - I get notified that my software is not genuine but cannot reenter the serial How do I set up file sharing between two Ubuntu laptops on my wireless network? I have two laptops running Ubuntu 12.04. Both connect to the same WIFI network to access internet.  How do I connect them to each other so that I can access files on one from another and vice versa?  Also, how do I manage the user permissions, etc. on them? Launch shell scripts from anywhere Is it possible to run my scripts located in ~/scripts from anywhere?  Say i want to run ./scriptname regardless of my current working directory. Can I use lens brand X on interchangeable lens camera brand Y? I've got some lenses of brand X, but I've just got a new camera of brand Y. How can I tell if it's possible to use my lenses on my camera? I accept that I may lose a lot of automatic functionality like autofocus, aperture control and metering when using an adapter to connect the two. Minion Pro, TL2016 and LuaLaTeX When I compile with LuaLaTeX and TL2016 this MWE   \documentclass{article}  \usepackage[no-math]{fontspec} \usepackage{luatex85} \usepackage{shellesc}  \setmainfont{Minion Pro}  \begin{document}  \huge{huge} \textbf{\huge{huge}}  \Huge{Huge} \textbf{\Huge{Huge}}   \end{document}   I have this .pdf.     Any help? With TL2015 all is correct. Thanks On really old Ubuntu 6.06 - How to upgrade How can I prove the maximum number of edges? On my book it says that the maximum number of edges E, in a simply connected undirected unweighted graph $G(V,E)$ is $\dfrac{|V|(|V|-1)}{2}$.  How can I show that it is true? Thanks! How can energy be useful when it is 'abstract'? The topic which haunted me for two years until I gave up on it. But now I am doing engineering and this topic suddenly popped out of my textbook from nowhere. I seriously need to understand this topic because I wasn't able to do so in the past. I have read many book on 'energy' and it came to nothing. Maybe just because the many books I have read all said 'energy' is something which doesn't 'exist'! It is 'abstract'! It is just a number which represents the state or orientation of a system. But then I see so many examples that 'uses' energy to do 'work'. But the question here is that if anything doesn't exist in this universe, then how can the same thing be used to do something that exist?  My problem is that I didn't understood the topic 'energy' and all the other topics related to it (work, power etc.) probability question ("birthday paradox") $n$ people attend the same meeting, what is the chance that two people share the same birthday? Given the first $b$ birthdays, the probability the next person doesn't share a birthday with any that went before is $(365-b)/365$. The probability that none share the same birthday is the following: $\Pi_{0}^{n-1}\frac{365-b}{365}$. How many people would have to attend a meeting so that there is at least a $50$% chance that two people share a birthday?   So I set $\Pi_{0}^{n-1}\frac{365-b}{365}=.5$ and from there I manipulated some algebra to get $\frac{364!}{(364-n)!365^{n}}=.5\iff (364-n)!365^{n}=364!/.5=.....$   There has to be an easier way of simplifying this. Picturing the how the covariant derivative acts on vector fields Concatenating a string and primary key Id while inserting When I create a UV sphere and add the subdivision surface modifier, the following wrinkle appears.    How can I avoid it?  I've read the article  but there seems to be no clear solution.  UPDATE 1  I've used the word 'apply' in the first sentence of the initial version of this question. It's misleading since I want to preserve the modifier without 'applying' it. Rather, what I meant is 'adding' the modifier.  UPDATE 2  I followed josh sanfelici's solution, but still there is an artifact at the pole.  Here is the screen: (A rendered view with a sun lamp)    Maybe it's the limitation of the general-purpose subdivision modifier.  BTW, when the cast modifier is added after the subdivision modifier, the sphere becomes perfect (even for my original wrinkled sphere).  But since I want to edit the resulting sphere (for example, scaling X, Y, etc) while modifier is added but not applied, it's not usable. Moving SQL Server to different domain Why is Buoyant Force $V\rho g$? For a submerged object, buoyant force ($F_b$) is defined as:  $$F_b = V_{\text{submerged}} \times \rho \text{ (density)} \times g \text{ (gravitational constant)}$$   Conceptually, the buoyant force equation says that buoyant force exerted is equal to the weight of the volume of water a given object displaced. Why? I went online to   and found the following explanation, but it seems like non-sequitur to me:      Explanation: When an object is removed, the volume that the object occupied will fill with fluid. This volume of fluid must be supported by the pressure of the surrounding liquid since a fluid can not support itself. When no object is present, the net upward force on this volume of fluid must equal to its weight, i.e. the weight of the fluid displaced. When the object is present, this same upward force will act on the object. Can Minecraft be played by two players locally on the same account? I just bought Minecraft. Now, my brother wants to play with me but my Mom doesn't want to buy another. We use the same Wifi network. Can we do this? Is there a way to have two copies of  app in Ubuntu each with a different account?  It seems copying the app in another folder does not work. Is it possible to copy an object in Illustrator so that if you make a change in any of them the changes will apply in both? Actually I have this situation where I have a lot of instances of the same object and I need to be faster on changes and copy-ing again and again is not a proper solution, but consumes a lot fo time.  Thank you for your time! Do resistances stack? If a creature had resistance to spells, and then cast fire resistance on it, would it take only 1/4 damage from all fire spells? Let $f$ be an analytic function such that $\operatorname{Im}(f(z))=\operatorname{Re}(f(z))^2$. Prove that $f$ is constant. How to solve this question? Also it would be great if someone could tell me from which book this question is from? Let $k$ be a finite field of order $q$ in characteristic $p$, let $n$ be a positive integer not divisible by $p$, and let $K$ be the splitting field of $X^n-1$ over $k$. Prove that $[K:k]$ equals the smallest positive integer $d$ such that $n\mid q^d-1$.  My approach: It's easy to show that if $k$ is a finite field of order $q$ with $\text{char} \ k=p$ then $k=\mathbb{F}_{q}$ with $q=p^m$ with $m\geq 1$. If $K$ is the splitting field of $X^n-1$ over $k$ then $K=\mathbb{F}_{q^r}$ for some suitable $r\geq 1$.  Let $\alpha \in K=\mathbb{F}_{q^r}$ be a root of $X^n-1$ then $\alpha^n-1=0$ and $\alpha\neq 0$.   Thus, $\alpha^n=1$ and $\alpha \in \mathbb{F}^{\times}_{q^r}$ where $\mathbb{F}^{\times}_{q^r}$ is the cyclic group of order $q^r-1$.  But I have some difficulties:  1) From $\alpha^n=1$ it follows that $o(\alpha)\mid n$. How to show that $o(\alpha)=n$? I was trying to show it using that $(n,p)=1$ but I failed.  Remark: Because if we can show that $o(\alpha)=n$ then the desired result follows immediately from cyclicity of multiplicative group of field $\mathbb{F}_{q^r}$.  I have spent one day in order to come up with this approach. So please do not duplicate this question and can anyone show how to answer my question, please.  Detailed explanation would be great!