Context:  We are running a system which has our Linux &amp; Unix Boxes authenticate against AD and because we have numerous different versions of Unix/Linux, we have to default to /bin/sh to make sure that the logins always work no matter the Server. I am looking to setup a .profile on RHEL to check to see what shell is set to at login and if its not bash, to switch to bash. I am not having any luck google searching for a method to do this and my shell scripting is on the weaker side.   Question:  How does one check for shell and switch at login without the control of the passwd file?
I am using my school's computers and would like to use zsh instead of bash. I'd like to make it the default shell, but I cannot run a command such as $ chsh -s $(which zsh) because I don't have admin privileges.   Is there a way I can put something in my .bashrc or something that automatically calls zsh when it opens as a workaround?   To clarify, zsh is already installed.
When I save a file (e.g. Images) to a folder which already exist there, Chrome adds a (N) where N is first available number. This causes I have multiple copies of same file! How can I disable Chrome's auto file renaming?   Thanks Customizing titlesec-etoc (further question) How to access an object from another class? How do I iterate over the properties of an anonymous object in C#? What is the usage of Zero Ohm & MiliOhm Resistor? I am new to PCB design and I noticed that some schematics use 0Ω or 100mΩ resistors. What is their purpose and why do we need to use them in our PCB design?  Normally if we wish to probe how much current the load is taking, we put a jumper pin across the PCB trace (then measure current across the pin using a multimeter). Adding resistors for this purpose seems like it would waste a lot of PCB real-estate. Is this the sole reason why 100mΩ resistors are being placed (since I = V/0.1Ω) instead of a jumper pin?   If so, is there any consideration we should take when placing such a mΩ resistor on board so it doesn't affect the signal or behaviour of the circuit? Can decimal numbers be considered "even" or "odd"? Install suspension forks on non-suspension bike Disabling SSLv3 but still supporting SSLv2Hello in Apache Many SSL clients, notably JDK 6, use the SSLv2Hello protocol to handshake with the server.  Using this protocol does not mean you are using SSL 2.0 or 3.0 for that matter; it is merely a handshake to determine which protocol to use.  [  However, in Apache, if you disable SSLv3 support, this apparently removes support for the SSLv2Hello protocol.  Apache Tomcat has explicit support for SSLv2Hello; that is, you can enable that, but not enable SSLv3.    Is there any way to do this in Apache?    [Update]   This is my protocol config:    SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2 -SSLv3 I was pondering a bit more about  question regarding being able to &quot;omit&quot; the base case in a proof by strong induction due to vacuous truth. The post states:  Strong induction proves a sequence of statements $P(0), P(1), …$ by proving the implication &quot;If $P(m)$ is true for all nonnegative integers $m$ less than $n$, then $P(n)$ is true.&quot; for every nonnegative integer $n$. There is no need for a separate base case, because the $n=0$ instance of the implication is the base case, vacuously.  However, if we consider $n=0$, we would have that the statement is vacuously true, which I would take to mean that the implication is true regardless of the validity of $P(0)$. However, clearly it's necessary for $P(0)$ to hold for an induction proof to be valid. So I'm confused on how, by omitting the base case, $n=0$ isn't just a tautology, making the implication true regardless of whether $P(0)$ actually holds. Attaching event handlers in Visual Basic .NET executing web service using postman As I'm learning about iptables I've made a couple of mistakes and locked myself out.  What method(s) do you use to test rules without locking yourself out?  I'm using ubuntu server 12.04 LTS    All the answers below were helpful.  In the end I used a combination of options.  It also helps to have IPMI access to your remote server just in case!  But ideally test the rules locally on a replicated environment and test that first.  Vagrant helps in this regard to get test setups working quickly. Fiction novel or movie about sentient dinosaurs Is it possible to wipe an entire iCloud Photo Library? I've been using the beta iCloud Photo Library for a week and a bunch of photos got duplicated and I'd like to wipe all the photos out and start over.  I have backups of all the photos and have turned off iPhoto Cloud Library on all iOS devices. When I log into the web app - it still shows dozens of albums and I can delete all the photos, then go to deleted items and then purge them, but the ghost albums are still there messing things up.  I've turned off the library entirely and you can see there is a 30 day waiting period.     If I click on albums, there are pages of them and no delete button anywhere. If I turn on the library on an iOS device, data starts flooding back as if I wanted to recover the photos.  I don't want to recover anything, I want a clean wipe and clean slate.  Currently, there are 7807 photos in the deleted album and no way to mass delete them. I have 31 albums that show up in iCloud and no way to delete them.  Is there some way to accelerate this or must people wait a month for a corrupt library to eventually be purged to start over?  (I have tickets open with AppleCare after  and it's escalated to engineering, but I was informed that it might be a week or two before it gets seen :-( Perhaps someone has a better idea to clear things out or noticed something I've missed.) Background process of subshell strange behaviour I wonder why some similar bash commands behave the way they do.  I have a bash script foo:  #!/usr/bin/env bash  while true do     echo "reading"     read data     echo $data     echo "stderr msg" &gt;&amp;2     sleep 1 done   It's an infinite loop which reads one line at a time from stdin and outputs that same line. I also have a bash script bar:  #!/usr/bin/env bash  ./foo &amp;   The following commands were run in bash (v. 4.4.19) in a terminal on Ubuntu 18.04 (let's assume the scripts reside in the working directory):   ./foo &amp;   Stops when it tries to read from stdin, in accordance with . Killed when controlling terminal is killed, as expected.  (./foo &amp;)   Appears to be automagically continuously fed with new input from stdin. Shouldn't it too stop when attempting to read from stdin? Whatever it's getting it doesn't show when echoed, thus I'm guessing it's EOF characters.  Continues running even after the controlling terminal is killed. Looking at the output of ps, the controlling terminal changes from pts/x to ?. How did this happen without the use of either disown or nohup? (However, after killing the originally controlling terminal, it yields a "write error: Input/output error" on every write, which I suppose is because its stdout was tied to the now closed terminal. Correct?)  bash -c "./foo &amp;"  Appears to behave exactly like 2). ./bar  Appears to behave exactly like 2) and 3). Adding bash -c "~/foo" (no &amp;) as a startup application  Behaves similarly to 2), 3) and 4), with the differences:   Its controlling terminal is the desktop ttyx. You can't (can you?) kill its controlling terminal.   None of those differences seem odd to me, just the fact that it's continuously fed with new input.   My guess is that 2) - 5) all use a subshell of sorts whose stdin is redirected to something like /dev/null, though I'm very unsure and seek a more exact answer. I have run a multiple linear regression using stepwise regression to select the best model, however the best model returned has a non-significant variable. When I remove this the AIC value goes up indicating the model without the significant variable is a worse fit. Should I remove the non-significant predictor or should I leave it in as it is a better model? Does this recording sound like the pulses emitted by bats? Out of curiosity, I recorded sounds in an area with lots of bats, hoping to be able to &quot;hear&quot; the bats communicating by lowering the ultrasound to a level down to the frequency which can be heard by a human. After a bit of post-processing, I actually hear interesting sounds, but I'm not sure about the origin. It seems that the frequency of the pulses is too low compared to bats. . Are those actual sounds emitted by bats? If not, what other animal could be the source of those sounds? About the audio The sound was recorded at 10 p.m. at  near a river, with more of a dozen bats flying in this zone. There is a bridge nearby, and the sides of the river are flat concrete, which means that there are a lot of opportunity for sound reflection (although high frequency sounds don't reflect well). Zoom H5 with the default XY directional microphone was used. The bitrate was set to 24-bit. Unfortunately, I used the sampling frequency of 48 kHz instead of the maximum 96 kHz. The following transformations were made to the original audio:  The pitch was shifted by -12 semi-tones, which means that the 20 kHz sound becomes 10 kHz, and 15 kHz becomes 7.5 kHz.   All sounds below 6 kHz were removed.  The sound was amplified.  Severe noise reduction was applied to eliminate everything but the actual sounds emitted by the bats.   The empty parts of the audio were removed.  The sound was amplified once again.   Frequency The frequency analysis of the transformed audio a peak around 9 kHz (18 kHz in the original audio), slowly fading to suddenly drop at 16 kHz (32 kHz in the original audio).   contains many sources with different indications about the frequency range of the sounds emitted by bats, only a few referencing the frequencies low enough to be heard by a human:  Frequency Produced 10kHz-120kHz Ramsey, Gabriel, McGuirk, Phillips, Watenpaugh. Holt Physical Science. New York: Holt, Rinehart and Winston Publishers, 1986.  while most agreeing on the fact that bats use frequencies higher than 20 kHz.  Most bats use frequencies in the range 20-80 kHz, only a few bats use frequencies less than 20 kHz. Long, M.R. &amp; Savage, J.G. Mammal Evolution. New York: Harper, 1976: 108.  The observed range of 18..32 kHz seems too low compared to the sources, but I have an impression that the frequencies vary a lot between different species of bats. Pattern When viewing the audio track (see below), each cry consists of several pulses in two to three sub-groups which are in turn in two groups. Each peak is a bit less than 1 ms. The second group occurs from 40 to 200 ms. after the end of the first one. Each sub-group is separated by 5 to 10 ms. The frequency of every pulse doesn't vary, except the very first pulse. The first cry starts by a more quiet pulse at 6 kHz (12 kHz in the original audio). The second and third cries don't follow this pattern.  indicates that there are three categories of sounds emitted by the bats:  Short clicks,  Frequency-swept pulses,  Constant frequency pulses.   It looks like it's still the third category which we are observing here, and the overall pattern looks similar to the one described for the bats. The gap between the left and the right track is mostly irrelevant: at higher frequencies, microphones become more and more directional, and the sound is reflected less, which leads to such difference.     Note: this question was considered to be on-topic at Biology.SE on . Equation System with 3 variables "Find all the possible solutions $(x,y,z) \in$  $\Bbb R$ that satisfies the following equation system".  My teacher gave me this problem and i got some clues in how to solve it. I evaluated $1$ and $-1$ and i got these solutions $(1,-1,1)$ and $(-1,-1,-1)$. I think these are the only ones but i can't prove it.  Am i wrong?, are there more solutions?.   Thanks  $$ \left\{  \begin{array}{c} x+y-z=-1 \\  x^2-y^2+z^2=1\\  -x^3+y^3+z^3=-1 \end{array} \right.  $$ I noticed that the these two commands to list files below 5 GiB produce different results:  find . -type f -size -5368709120c find . -type f -size -5G   Specifically the one that uses kilobyte unit (5368709120c) returns additional files that are larger than the maximum file size returned by the one that uses the GiB unit (5G).  From the find manual page I read the following:  -size n[cwbkMG]           File uses n units of space.  The following suffixes can be used:           `b'    for 512-byte blocks (this is the default if no suffix is used)           `c'    for bytes           `w'    for two-byte words           `k'    for Kilobytes (units of 1024 bytes)           `M'    for Megabytes (units of 1048576 bytes)           `G'    for Gigabytes (units of 1073741824 bytes)  The size does not count indirect blocks, but it does count blocks  in sparse files that are not actually allocated.  Bear in mind that the `%k' and `%b' format specifiers of -printf handle sparse files differently.   The  `b'  suffix always denotes 512-byte blocks and never 1 Kilobyte blocks,  which is different to the behaviour of -ls.   So, given that the unit of G is 1073741824, 5G should be 5368709120c. Is the issue due to how sparse or indirect blocks are counted?  Thanks in advance for the help. How to determine whether a unique factorization domain is a principal ideal domain? Could someone please provide an example of a unique factorization domain that is not a principal ideal domain?  Furthermore, is there some way to determine whether a UFD is a PID?