How can run a bash script and its inputs in one line instead of separate commands?  my code  #!/bin/bash read input1 input2 ...   In terminal:  bash file.sh input1 input2   instead of:  bash file.sh input1 input2
Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?
Why do the big nuts always remain at top? The Brazil-nut Effect Most of the time when I mixed different nuts in a bowl, I observed that the big Brazil nuts were always on top while the small peanuts settled near the base. No matter how you take it, if the big nuts are put at the bottom and then the small nuts are poured, then also after some time the big ones will come to the top. Will not the gravity attract those big nuts more and eventually will they not remain at the base? But it doesn't happen!   I googled it and found the term Brazil-nut Effect but couldn't find any proper explanation. What is the physical explanation for this effect? How to make X.org listen to remote connections on port 6000? This is on Ubuntu 10.10 (Maverick Meerkat) 64-bit desktop.  I want to make my X server listen to remote connections from clients in other machines on the local network. I know about ssh -X and that is not what I want. I vaguely remember changing something like TCPListen from no to yes, but I don't remember where this change should be applied.  I'm interested in either a GUI method or a CLI one.  PS editing /etc/X11/xinit/xserverrc to remove the -nolisten tcp option and rebooting does not work. Present Perfect with the word "ago"? First, I check that my native language is not English, and the problem described below met on one of the exams.   With this sentence:      "The most important news is that my parents [...] a new restaurant a few   weeks ago."   Is the correct tense to use the Present Perfect (have opened) or Past Simple (opened)?   I know that the word "ago" but rather that time Past Simple, but is it also possible to use the present perfect in some cases?  I would be grateful for clarification. Is there an intelligent way to left-align the parts right of &amp; of the two cases environments shown below (if x >= 0, otherwise, if y &lt; 0, otherwise). I wonder if there is a better way than using manual spaces:  \begin{align*}  u(x) &amp;=   \begin{cases}    0        &amp; \text{if } x \geq 0 \\    1        &amp; \text{otherwise}   \end{cases}   \\  \tau &amp;=   \begin{cases}    a+b+c+d  &amp; \text{if } y &lt; 0 \\    1        &amp; \text{otherwise}   \end{cases} \end{align*} Is there a non written rule to which person to use in the PhD thesis, 5 years of using "We" in the papers have brought me to the innate necessity to do it every time I describe something.  Recently, though, one of my lab-mates told me that I should use I, since it is your work, if the thesis were co-written, then it would be a different story.  Is there any standard in your universities, or do you have any preferred practice. Let H={e,(12)(34)} and K ={e, (12)(34), (13)(24), (14)(23)} be subgroups of $ S_4$ where e is identity element. Then which of following is true   H and K are normal subgroups of $S_4$ H is normal in K and K is normal in$ A_4$ H is normal in $A_4$, but not normal in $ S_4$ K is normal in $S_4$ but H is not   How should this question be approached, checking left and right cosets of these subgroup is very time consuming. Checking gh$ g^{-1}$ $\in $ H for every g in $ S_4$ is also time consuming. Convergence of $1-\frac12-\frac13+\frac14+\frac15+\frac16-....$ How can I restore configuration files? Show $\lim_{h\to 0} \frac{(a^h-1)}{h}$ exists without l'Hôpital or even referencing $e$ or natural log I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the same function but with different domain how is this possible?  Or in other words why don't we simplify $f(x) = \frac{x-1}{x-1}$ to $f(x) = 1$ before plotting the points. Is it just defined this way or is there a particular reason ?  Note: my book says the domain of $f(x) = 1$ is $\mathbb{R}$ and the domain of  $f(x) = \frac{x-1}{x-1}$ is $\mathbb{R}$ except $1$. CSS selector for first element with class How much web can Spider-Man produce? Especially if he is not using his  but .   Also what happens to the web that he leaves behind? Does it decay after certain time or lose it stickiness and drops off? Javascript multiple replace Wasted screen space due to multiple horizontal bars at the top when an application is open in GNOME desktop Just moved from Unity to GNOME with the update to Ubuntu 17.10. There is a HUGE amount of wasted space at the top of the screen, when an application is open.  Evolution and Firefox both have four "bars" with 90% of each empty. Unity, to its credit was able to blend / mix these horizontal bars so there was only one / two.      Four is way too much. If this is GNOME I may carry on with Unity for the next six months.  Can anybody suggest a tweak/change/fix for this? What exactly is a distribution? I know very little of Probability and Statistics, and am wishing to learn.  I see the word "distribution" used all over the place in different contexts.  For example, a discrete random variable has a "probability distribution."  I know what this is. A continuous random variable has a probability density function, then for $x\in\mathbb{R}$, the integral from $-\infty$ to $x$ of the probability density function is the cumulative distribution function evaluated at $x$.   And apparently just "distribution function" is synonymous with "cumulative distribution function," at least when talking about continuous random variables (question: are they always synonyms?).  Then there are many famous distributions.  $\Gamma$ distribution $\chi^2$ distribution, etc.  But what exactly is a $\Gamma$ distribution?  Is it the cumulative distribution function of a $\Gamma$ random variable?  Or the probability density function of a $\Gamma$ random variable?  But then a frequency distribution of a finite data set appears to be a histogram.  Long story short: in Probability and Statistics, what is the definition of the word "distribution"?    I know the definition of distribution in Mathematics (an element of the dual space of the collection of test functions equipped with the inductive limit topology), but not Probability and Statistics. I'm on a Mac and the cp and mv commands are killing me due to them copying the contents of a directory if a trailing slash is present. It has bitten me more than once when I use tab completion to specify the directory I want to copy.  I have noticed zsh has a neat feature that removes the trailing slash if it's not needed after a space or enter key is pressed. Is there any way to have bash mimic this behavior? Smoothing/generalizing polygon in QGIS? Is it possible to smooth or generalize a polygon in QGIS, perhaps by using a plugin like the generalizer-plugin for lines?  I could convert my polygons to lines, smooth them and convert them back to polygons but this is not working for my polygons because of several reasons. The Stack Exchange beta iOS app distributed over TestFlight will expire in 2 days has expired. After the 100 day test period, the app won't start any more so all beta testers can't use the app then.  Can we please get an updated release so we don't have to remove the app and install the current release from the App Store instead? How can I make Devanagari fonts render properly in Ubuntu 16.04? Devanagari fonts appear broken like this:     It should appear this way    I have the same problem in browsers and office applications.  Is there any way to fix it? On freedom in Sartre's existentialism I am reading "Existenstialism is a humanism", the text of the famous conference by Sartre in which he explains his own version of existentialism. I think is full of logical inconsistencies, but maybe it's just because I don't understand it or I don't know enough about existentialism. Anyway, my question is about a specific passage. After having "demonstrated" that there is no way one can derive an ethics outside of Man (God does not exist and reason is insufficient), he asks himself according to what principle a person should behave and he says:     "For I declare that freedom, in respect of concrete circumstances, can   have no other end and aim but itself; and when once a man has seen   that values depend upon himself, in that state of forsakenness he can   will only one thing, and that is freedom as the foundation of all   values. That does not mean that he wills it in the abstract: it simply   means that the actions of men of good faith have, as their ultimate   significance, the quest of freedom itself as such."   So it seems Sartre says that when deciding a course of action, people will always choose "freedom," (and also, elsewhere, that "freedom" is always a good thing). That is for him the only principle, the only moral that governs or should (because we can do wrong judgments about what is freedom) govern our action.  My questions are:  1) do I understand correctly Sartre's thinking?  2) He says: a) freedom is absolute; b) the values that man chooses are also absolute because no God or reason can tell him what to do, c) therefore man will choose freedom. Is there any logic in this statement? If I replace freedom with X where X is "pleasure" or "justice" or "pain" or "zero temperature", wouldn't I "demonstrate" by this logic that man will choose X?  3) assuming what I said makes any sense, how can existentialism ever find a rule of moral conduct? and if it does, what is it and how can be demonstrated? and if it cannot, why is or has been important at all as a philosophy?  Thanks!