Multi-line group capturing between braces
How do I grep for multiple patterns on multiple lines?
I'm trying to determine the best way to truncate or drop extra decimal places in SQL without rounding.  For example:  declare @value decimal(18,2)  set @value = 123.456   This will automatically round @value to be 123.46, which is good in most cases.  However, for this project, I don't need that.  Is there a simple way to truncate the decimals I don't need?  I know I can use the left() function and convert back to a decimal.  Are there any other ways? In Volo's Guide to Monsters, there is a race in the bestiary called Grungs. Were these created for 5e specifically?  I'm pretty sure they were created for 5e, as they have no deities listed which is always a bit suspicious, but I'm just making sure. command not found and syntax error near unexpected token I have this script to divide a file over a 100000 or even more in 50000 lines.  desc()                                                     {                                                       echo $1 $2|awk '{d=$1;}                                 BEGIN {a=1;b=0}                                            { f=d"0"a;                                                while ((getline x&lt;d)&gt;0)                                   { print x&gt;&gt;f".txt"                                        if (b++&gt;=50000)                                            {                                                         close(f);b=0;a++;f=(a&lt;10)?d"0"a:f=d""a                }                                                  }                                                   }                                                   END {print "Terminado ... ! "}'                         }                                                      if [ -f $1 ]; then                                              desc $1 $2                                      fi                                                        When I execute it I got this error message:  sh-3.2$ parte.sh pa.txt                                  : command not found                                      '/parte.sh: line 2: syntax error near unexpected token ` '/parte.sh: line 2: `desc()                              sh-3.2$                                                    Can anyone help to solve it? $\ker T\subset \ker S\Rightarrow S=rT$ when $S$ and $T$ are linear functionals How can I prove that $\frac{n^2}{x_1+x_2+\dots+x_n} \le \frac{1}{x_1}+ \frac{1}{x_2} +\dots+ \frac{1}{x_n}$? How can I prove that $\frac{n^2}{x_1+x_2+\dots+x_n} \le \frac{1}{x_1}+ \frac{1}{x_2} +\dots+ \frac{1}{x_n}$?   im trying to use AM-GM  $\sqrt[n]{ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}}   \le \sum_{k=1}^n \frac{{\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}}{n}$  $ln\sqrt[n]{ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}} \le ln \frac{1}{n} \sum_{k=1}^n {\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}$  $ \frac{1}{x_1} \frac{1}{x_2} \frac{1}{x_3} ..\frac{1}{x_n}\le  \sum_{k=1}^n {\frac{1}{x_1} +\frac{1}{x_2}+ \frac{1}{x_3}+ ..\frac{1}{x_n}}$  im not sure is this right or not, however i dont know how to include the $n^2$ in the nominator? is there also alternative proof using jensen inequality? Crash adding comment The SE iOS app crashes when adding comments to certain posts.  It was discovered to be if the "Add an Answer" button was visible, not just responding to a deleted comment.  Edited to match answer. Previous steps were not the only use case, and this error keeps getting re-reported in different ways. What PDF Editors are available on Ubuntu? I was wondering if there is a pdf reader-writer-publisher-editor that can add text, highlight, shapes and general edit an existing pdf document.  Something like Nitro in windows. How to add a progress bar to a shell script? When scripting in bash or any other shell in *NIX, while running a command that will take more than a few seconds, a progress bar is needed.  For example, copying a big file, opening a big tar file.  What ways do you recommend to add progress bars to shell scripts? Recovering an accidentally deleted  folder in OSX - no Time Machine or backup available I am a longtime Windows user, recently switched to Mac. I replaced folder with another folder (they had the same name) thinking that OS X will merge the contents of both folders. But OS X deleted the original folder and replaced it with the new one. Windows merges both the folders (I do this often in Windows). I have now lost hundreds of files. I haven't enabled Time Machine. I've tried using Finder's Undo, but that doesn't work.  Currently, I am trying to recover my data using . It shows estimated time as 7 hours, 31 minutes. Does anyone know any free data recovery software that's faster and more powerful? Consider the following two versions of a question:1   Version 1: What is the difference in meaning between "[to be] not invited" and similar negation forms?  Version 2: What is the difference in meaning among "[to be] not invited" and similar negated forms?    Personally, I think Version 1 might subtly suggest a Star Topology (see below) with the target sentence "[to be] not invited"at the center.  And Version 2 might subtly suggest a more free-form comparison like the Mesh or Fully Connected, with the target sentence simply "one among many":   Between approx equal "Star" and among approx equal "Fully Connected"?  Don't get me wrong: I do think this is quite subtle, not always applicable, and I don't think anyone would intuit such a "network topology" meaning without further explanation.   So the main question is, are both grammatically correct?  If yes, is there a semantic difference to choose one over another, perhaps as I suggested?  Or does the plurality aspect of between and among trump other semantic and stylistic issues?    1. In my question , another user provided a very helpful edit. However, the change of the word between to among prompted this question. How to get own process pid from the command prompt in Windows I'm trying to find a way to get my own PID from a command prompt (for later use in bat scripts).  So far the only useful way I found was to use getpids.exe from here : , but I'm looking for a command that's "built in" to Windows.  I'm looking for a "bullet proof" way. No assumptions about my process being the only cmd.exe or anything. How to change specific values in a List The word or phrase I am looking for is quite opposite to that of the situation when people, such as students or sports players, sing their national anthem with the same tone and words.  I want a single word or even phrase that can describe the situation when two or more people speak at the same time with different tone and words . . . and at the end, the listener cannot get what they are saying. This situation can be found while debating, telling a news about any incident or even while complaining.     Due to _____ , the teacher could not get what they are saying.   If it's not feasible to find a noun or phrase for such situation, then here I request to have an adverb standing alone to describe how they are speaking, for instance, what is the adverb for "at the same time"?.  Here is how, I want to convert sentence 1 into sentence 2.        They spoke at the same time, and the teacher could not get what they are saying.   They spoke _____ , and the teacher could not get what they are saying. How to Recover truncate table in MySQL? Prove: $|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$ $$|a\sin x+b \cos x|\leq \sqrt{a^2+b^2}$$   I have tried: $$|a\sin x+b \cos x|\leq |a+b|\leq \sqrt{a^2+b^2}$$  enough to prove: $$|a+b|\leq \sqrt{a^2+b^2}$$  But I can find how to continue from here SQL Server Escape an Underscore How do I escape the underscore character?  I am writing something like the following where clause and want to be able to find actual entries with _d at the end.  Where Username Like '%_d' Keyboard shortcut to autocomplete the user in comments Is there console mode in Mac OS X? What is the best way to give a C# auto-property an initial value? How do you give a C# auto-property an initial value?  I either use the constructor, or revert to the old syntax.    Using the Constructor:  class Person  {     public Person()     {         Name = "Initial Name";     }     public string Name { get; set; } }   Using normal property syntax  (with an initial value)  private string name = "Initial Name"; public string Name  {     get      {         return name;     }     set     {         name = value;     } }   Is there a better way? C++ 11 Thread initialization with member functions compiling error