I am trying to follow Bash Cookbook to learn about Bash Scripting. I am on example 6.8 Testing with Regular Expression.   I have the following script:  #!/usr/bin/env bash # cookbook filename: trackmatch  for CDTRACK in * do      if [[ "$CDTRACK" =~ "([[:alpha:][:blank:]]*)- ([[:digit:]]*) - (.*)$" ]] then     echo ${BASH_REMATCH[2]} else     echo Error $CDTRACK fi done   I apply this to a couple of files in my directory:  Ludwig van Beethovern - 02 - Adagio un poco mosso.ogg  Ludwig van Beethovern - 01 - Allegro.ogg  I always get an error returned. The issue appears to be with ([[:alpha:][:blank:]]*)- ([[:digit:]]*) - section of code. When I do have the if statement as: if [[ "$CDTRACK" =~ "(.*)$" ]] then there is no error.  Any thoughts as to what I am doing wrong?  I am running the code on AWS, Bash v 4.2
Look at this if block:  #!/bin/bash  str="m.m" if [[ "${str}" =~ "m\.m" ]]; then     echo "matched" else     echo "not matched"     exit 1 fi  exit 0   This should print "matched", but it doesn't. Where am I going wrong?
Ssh login hook? Selecting text in profile activity comments causes unexpected clipping What are these cartridges that many characters have in the Star Wars movies? Admiral Ozzel has them on both sides of his uniform (upper chest).  Most Imperial officers seem to have them.  Han, pictured also here, has three such cartridges on his jacket.  I'd like to make such a jacket and use anything that looks like them.  I figure they are most closely related to cartridges for guns.  (which is what I imagine they are in the films).  But does anyone know the real scoop on them?  What is their purpose in the Star Wars universe?  Admiral Ozzel:    And Han Solo: I recently read that:     What our current level of thermodynamics does tell us though is that if there is such a thing as a Big Crunch, the universe will look a lot different as it heads towards collapse than it did when expanding – the universe started in a state of low entropy and high order and will end in a state of high entropy and   low order.   But shouldn't the order be in a high state and hence entropy becomes a low state in the Big Crunch (assuming a closed universe)?  The reason I write this is because the gravitational forces in a closed universe are so strong they will cause gravitational collapse so the universe will shrink and go backwards, eventually through all the stages of the big bang and become a singularity once more.   It was my understanding that a singularity has a state of high order and low entropy. Have I got this the wrong way round?   If so; Can someone please explain why? I am not a native speaker. On a previous question of mine, I thanked for an answer by saying:     So the phrase is not an idiom, since it is applied in its literal sense.   I consciously chose since over because, because — well, I like that usage of since, even though I know that some (native speakers) don't like it. Nonetheless, that choice got me thinking for a while, and it occurred to me that I even could have used more alternatives, namely as or for, without changing the meaning.   So, on a general note, here are the alternatives:        Statement A (is true), because statement B (is true).   Statement A (is true), since statement B (is true).   Statement A (is true), as statement B (is true).   Statement A (is true), for statement B (is true).      Are these completely interchangeable? Or interchangeable in certain situations? Or can you point out any (not-so-)subtle differences between any of them? Are there even more synonyms? How do I set up a Godox X2Tc to control a Canon Speedlite 430 EXII I have a Godox X2Tc and a Godox X1Rc. I want to control my Canon Speedlite 430 EXII. (I also have a Godox V1, which is a beautiful thing!) I have the Canon Speedlite attached to the Godox receiver, so it should fire. It just wont! How do I set it up correctly so the receiver makes the Canon Speedlite fire?  Update: Michael C answered this question. I had the ID numbers set differently on the transmitter and receiver. I made them the same and now it all works. Perfect! Thanks Michael!! How do I break out of a loop in Perl? I'm trying to use a break statement in a for loop, but since I'm also using strict subs in my Perl code, I'm getting an error saying:     Bareword "break" not allowed while   "strict subs" in use at ./final.pl   line 154.   Is there a workaround for this (besides disabling strict subs)?  My code is formatted as follows:  for my $entry (@array){     if ($string eq "text"){          break;     } } Why does Property Set throw StackOverflow exception? I know java and would normally put in getter/setter methods. I am interested in doing it in C# with the following code, but it throws a StackOverflow exception. What am I doing wrong?  Calling Code  c.firstName = "a";   Property Code    public String firstName; {     get     {         return firstName;     }     set     {         firstName = value;     } } How does Salesforce SSO call just-in-time handler methods WUBI installed Ubuntu not showing up at boot menu after Windows reinstallation Why does no line appear when using Interpolate Line in ArcMap? How can I work around this TikZ bug: (\x)^2 and \x^2 produce different results in TikZ plot? How to learn commutative algebra? I want to learn commutative algebra from scratch. I was wondering, as you are experts in mathematics, what you think is the best way to learn commutative algebra? Is there any video course available for commutative algebra? Will there be some online course for commutative algebra on some website like Coursera, etc?  I know noncommutative algebra up to the Artin-Wedderburn Theorem. Also, I know group theory up to the Sylow theorems and Galois Theory. I also know some basic topology.  I'm new to this site so I don't know what tags I should add for this question. Please feel free to edit my question.  Edit 1: I want to learn commutative algebra for learning Algebraic Geometry. US Customs when coming through Canada I have an upcoming trip where I will be flying to and from Copenhagen, through Toronto.  I notice that my departure and return gate in the Philadelphia airport is not in the international terminal.  Where will I clear customs? Let $f:[0,\infty)\rightarrow [0,\infty) $ be a continuous strictly increasing function and $g=f^{-1}$. Let $a,b&gt;0$ and $a\neq b$. Then how $\displaystyle\int_{0}^af(x)dx+\int_0^bg(y)dy\geq ab.$ Any hint will be appreciated. What partitioning scheme do you recommend for a desktop? I've always created three or four primary partitions -- root, swap, home, and sometimes a separate boot partition. Ubuntu's default install offers LVMs. I've never had to add additional drives or space, so it never seemed like a big deal. Whenever I do a fresh install, though, I always think there might be a better way. This is the achievements drop-down on Ask Ubuntu:    It doesn't look very good. The same happens on Meta SE - so it's a new and old top-bar issue.    Mac OS 10.12.6, Chrome 60.0.3112.113. Also happens in Safari 11.0 and Chrome incognito mode with no extensions, so is not a user-script issue. Zoom at 100%.  Does not happen with Chrome on Windows 10. How do I fix this "E: Type '*' is not known on line * in source list ..." update error? Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed? I got a positive definite matrix $B,$ that is, $V(x) = x^TBx &gt; 0$ for any vector $ x \neq 0.$  I want to show that $ \lambda_\min \|x\|_2^2 \leq V(x) \leq \lambda_\max \|x\|_2^2$ for any $x \neq 0,$ where $\lambda_\min$ and $ \lambda_\max$ are defined by $$ \lambda_\min = \min \lbrace | \lambda|: \lambda \text{ is an eigenvalue of } B \rbrace$$ and  $$ \lambda_\max = \max \lbrace | \lambda|: \lambda \text{ is an eigenvalue of } B  \rbrace$$  Any hint please? How to draw arrows between circled coefficients of polynomials using tikz