I have a names.txt file with with the top line of text being  51 Pipe-line\Closed3\00001011_-_Portfolio\UW\Old\NID50_Future_022814.xlsx   I would like to write new filenames replacing \ with /  I wrote a script.sh and invoked it using sh script.sh. My first attempt...    while read one two three; do    new=$(echo $two|tr '\\' '/')   echo $one   echo $two   echo $three   echo $new  done &lt; ./names.txt     51 Pipe-lineClosed300001011_-_PortfolioUWOldNID50_Future_022814.xlsx  Pipe-lineClosed300001011_-_PortfolioUWOldNID50_Future_022814.xlsx     This ate the / char. I found out passing a -r will show the / so my next attempt was   while read -r one two three; do    new=$(echo $two|tr '\\' '/')   echo $one   echo $two   echo $three   echo $new  done &lt; ./names.txt     51 Pipe-line\Closed3  Pipe-line/Closed3     This eats half the filename. What is happening? How do I get this to work?
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?
Apply function conditionally How can I see the source of built-in JavaScript functions? Did other meta-humans enter a coma? In the first episode of The Flash (2014), Barry's struck by lightning, some chemicals fall on him, and he enters a coma for 9 months.  This happens when the S.T.A.R. Labs particle accelerator is turned on for the first time.  9 months later, he wakes up and has powers.  He then starts fighting crime, especially other meta-humans who were created by the same particle accelerator accident.  However, this is all 9 months after the accident, where were the other meta-humans during those 9 months?  The S.T.A.R. Labs people make it sound like they hadn't seen any meta-humans active during the 9 months Barry was out.  Did all people granted powers by the particle accelerator accident also fall into comas?  Why weren't they active heroes/villains during the 9 month gap? How to make a bootable ISO image from a bootable DVD? Comparison between bootstrap percentiles confidence interval and BCa confidence interval? I have generated a nonparametric percentiles bootstrap confidence interval ($32.27143, 51.08571$), and a BCA confidence interval ($33.26, 53.49$) with an initial sample size of $n=7$.  Evidently, the BCA interval is larger than the percentiles interval. Shouldn't the BCA interval be better than the percentiles interval (and by "better" I mean "smaller")? I noticed also that when the sample size is larger, for example $n=40$, BCa confidence interval decreases. Reflection of a line in a plane The line $l_1$ has the equation $r=(6i+2-2k)+\lambda(4i+5j-k)$ and the plane $\pi_1$: $2x-y+4z=4$, the line $l_2$ is the reflection of $l_1$ in the plane $\pi_1$. Find the exact vector equation of line $l_2$   So the line intersects the plane when $\lambda=-2$, giving the point $(-2,-8,0)$ which will be common on $l_1$ and $l_2$. But I am unsure on how to find the direction vector for $l_2$. Any help would be appreciated. Intuition behind why order of a subgroup divides order of a group. Combinatorial proof of $\sum_{i = 0}^{n} \binom{i}{r - 1} = \binom{n + 1}{r}$ and then use result to find a formula for $1^2 + 2^2 + \ldots + n^2$ Website Visible only to Registered users Enable or check Chatter Feed Tracking programatically Which side of wave-particle duality to choose in a given situation How does one know whether, in treating a certain problem, one should consider particles as waves or as point-like objects? Are there certain guidelines regarding this? Embedding images explodes generated PDF size It is well known that a  can "split light" by separating different frequencies of light:    Many sources state that the reason this happens is that the  is different for different frequencies.  This is known as .  My question is about why dispersion exists.  Is frequency dependence for refraction a property fundamental to all waves?  Is the effect the result of some sort of non-linearity in response by the refracting material to electromagnetic fields?  Are there (theoretically) any materials that have an essentially constant, non-unity index of refraction (at least for the visible spectrum)? Appending to the end of a file with NSMutableString How do I print my Java object without getting "SomeType@2f92e0f4"? Prevent Photos app on OSX from launching when plugging in device Python CSV parsing not returning proper rows How to set custom keyboard shortcuts from terminal? How do I get an animated gif to work in WPF? What control type should I use - Image, MediaElement, etc.? Error message: qgis_core.dll missing I have a fresh install of QGIS 2.4. When trying to open a .shp file I get the error message below.  I've followed their advice and have done several re-installs and also cleared all qgis files from my system (Parallels on Mac OS X 10.6) before those re-installs. I've tried QGIS 2.2 which caused the same problem.  Funnily all worked for a day, the following day and since not anymore...  Has anyone come across this before?