I'm trying to run an expect script that runs a telnet session to automate the sending of an email, I'm trying to pass the contents of a file as a single argument to my script but when the backticks are interpreted the white space in that file are causing multiple arguments to be passed.  Here's my command...   runTelnet `cat test_results.txt`   Is there a way to quote the output of a backtick expression?
Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?
How to properly adjust monitor brightness and contrast? Getting polygon boundaries of City in JSON from Google Maps API? Show that $\mathbb{Q}(\sqrt{2})$ is the smallest subfield of $\mathbb{C}$ that contains $\sqrt{2}$ This was an assertion made in our textbook but I have no idea how to show that either statement is true.  Also would like to show that that $\mathbb{Q}(\sqrt{2})$ is strictly larger than $\mathbb{Q}$, which was the second part of the assertion. Force JavaScript exception/error when reading an undefined object property? If a function $f$ is continuous $\implies$ $|f|$ is continuous.(Answered by Myself) $(i)$ Given a function $f:E \rightarrow \mathbb{R}$ define $|f|:E \rightarrow \mathbb{R}$ by $|f|(x)=|f(x)|$ for $x \in E$ show if $f$ is continuous at $c \in E$ then so is $|f|$.        $(ii)$ Now the converse is not true, find $f$ such that $|f|$ is continuous but $f$ is not. I am given two charged particles of same charge at a distance of $r$. They initially apply force $F$.  Now an infinite dielectric (of dielectric constant $4$) of width $\frac{r}{2}$ is introduced between the particles. What will be the new force?   I find this problem confusing because I have only been told about forces when its either fully dielectric or fully vaccum given by Coulomb's law. How do we get forces when only partial space is dielectric? Different ways to prove there are infinitely many primes? This is just a curiosity. I have come across multiple proofs of the fact that there are infinitely many primes, some of them were quite trivial, but some others were really, really fancy. I'll show you what proofs I have and I'd like to know more because I think it's cool to see that something can be proved in so many different ways.  Proof 1 : Euclid's. If there are finitely many primes then $p_1 p_2 ... p_n + 1$ is coprime to all of these guys. This is the basic idea in most proofs : generate a number coprime to all previous primes.  Proof 2 : Consider the sequence $a_n = 2^{2^n} + 1$. We have that  $$ 2^{2^n}-1 = (2^{2^1} - 1) \prod_{m=1}^{n-1} (2^{2^m}+1), $$  so that for $m &lt; n$, $(2^{2^m} + 1, 2^{2^n} + 1) \, | \, (2^{2^n}-1, 2^{2^n} +1) = 1$. Since we have an infinite sequence of numbers coprime in pairs, at least one prime number must divide each one of them and they are all distinct primes, thus giving an infinity of them.  Proof 3 : (Note : I particularly like this one.) Define a topology on $\mathbb Z$ in the following way : a set $\mathscr N$ of integers is said to be open if for every $n \in \mathscr N$ there is an arithmetic progression $\mathscr A$ such that $n \in \mathscr A \subseteq \mathscr N$. This can easily be proven to define a topology on $\mathbb Z$. Note that under this topology arithmetic progressions are open and closed. Supposing there are finitely many primes, notice that this means that the set $$ \mathscr U \,\,\,\, \overset{def}{=} \,\,\, \bigcup_{p} \,\, p \mathbb Z $$ should be open and closed, but by the fundamental theorem of arithmetic, its complement in $\mathbb Z$ is the set $\{ -1, 1 \}$, which is not open, thus giving a contradiction.   Proof 4 : Let $a,b$ be coprime integers and $c &gt; 0$. There exists $x$ such that $(a+bx, c) = 1$. To see this, choose $x$ such that $a+bx \not\equiv 0 \, \mathrm{mod}$ $p_i$ for all primes $p_i$ dividing $c$. If $a \equiv 0 \, \mathrm{mod}$ $p_i$, since $a$ and $b$ are coprime, $b$ has an inverse mod $p_i$, call it $\overline{b}$. Choosing $x \equiv \overline{b} \, \mathrm{mod}$ $p_i$, you are done. If $a \not\equiv 0 \, \mathrm{mod}$ $p_i$, then choosing $x \equiv 0 \, \mathrm{mod}$ $p_i$ works fine. Find $x$ using the Chinese Remainder Theorem.   Now assuming there are finitely many primes, let $c$ be the product of all of them. Our construction generates an integer coprime to $c$, giving a contradiction to the fundamental theorem of arithmetic.  Proof 5 : Dirichlet's theorem on arithmetic progressions (just so that you not bring it up as an example...)  Do you have any other nice proofs? Isn't finding the inverse of $a$, that is, $a'$ in $aa'\equiv1\pmod{m}$ equivalent to solving the diophantine equation $aa'-mb=1$, where the unknowns are $a'$ and $b$? I have seem some answers on this site (where the extended Euclidean Algorithm is mentioned mainly) as well as looked up some books but there is no mention of this. Am I going wrong somewhere or is this a correct method of finding modular inverses? Also can't we find the Bézout's coefficients by solving the corresponding diophantine equation instead of using the extended Euclidean Algorithm? Hyperref: Changing the linkcolor locally in the TOC I found that the link-color for TOC text is identical to the link-color for Figures and Tables. When I change the color to black in the TOC also the color for Figures/Tables citation etc. is changed.  Is there a way to separately set the colors inside the TOC and outside? Let $\alpha$ be a regular curve in $\mathbb{R}^2$ and let all of its tangent lines pass through the origin. Also, let $\beta$ be a regular curve in $\mathbb{R}^2$ and let all of its normal lines pass through the origin.   How can I show that $\alpha$ is contained in a straight line through the origin and that $\beta$ is contained in a circle around the origin?  I know that the tangent line $\alpha(t)$ is the line that points in the direction of the tangent vector $T(t)$ and that the normal line of $\beta(t)$ is the line that points in the direction of $N(t)$, but how can I put this all together to complete the proof? I have a file containing two columns and 10 million rows. The first column contains many repeated values, but there is a distinct value in column 2. I want to remove the repeated rows and want to keep only one using awk. Note: the file is sorted with values in column 1. For example:    1.123 -4.0 2.234 -3.5 2.234 -3.1 2.234 -2.0 4.432 0.0 5.123 +0.2 8.654 +0.5 8.654 +0.8 8.654 +0.9 . . . .   Expected output  1.123 -4.0 2.234 -3.5 4.432 0.0 5.123 +0.2 8.654 +0.5 . . . . Generating ordered combination of numbers How to execute two mysql queries as one in PHP/MYSQL? I will have a 10 hour layover in Seoul (ICN) and I want to go out and do some shopping. Is it possible to check in a bag during my layover?  I will be traveling on Korean Air.  I will only have 1 checked bag, and international flights allow 2 bags free. Why would one suppress the intercept in linear regression? In a number of statistical packages including SAS, SPSS and maybe more, there is an option to "suppress the intercept". Why would you want to do that? Triggering actions when a variable is set Best way to find a point on a circle closest to a given point Given a point (pX, pY) and a circle with a known center (cX,cY) and radius (r), what is the shortest amount of code you can come up with to find the point on the circle closest to (pX, pY) ?  I've got some code kind of working but it involves converting the circle to an equation of the form (x - cX)^2 + (y - cY)^2 = r^2 (where r is radius) and using the equation of the line from point (pX, pY) to (cX, cY) to create a quadratic equation to be solved.  Once I iron out the bugs it'll do, but it seems such an inelegant solution. How can I set a dark theme in TeXstudio? After perusing , I'm considering switching from TeXmaker (in which I use the preset "dark theme") to its fork, TeXstudio.  What I mean by "dark theme" is a dark background with suitable text colours, which, in my experience, is easier on the eyes than a bright background is. Here is an example:    TeXstudio doesn't seem to offer any preset dark theme, though, which means I have to customise all the colours/syntax-highlighting settings from scratch to get a dark theme even remotely usable. This can prove very time-consuming.   I'm aware this might sound a bit cheeky but,   if you are a long-time TeXstudio user, and you have fine-tuned the editor colours to get a visually pleasant dark theme,   please consider posting the relevant lines from your settings (.txsprofile or .tmxprofile) file as an answer below.  TeXstudio users who would like to use a dark theme could then build on your settings to fine-tune their own. Random plot based on a specific random seed Let $X\subset \mathbb{R}$ Lebesgue measurable, $|X|<|\mathbb{R}|$, is it true that $X$ is null?