My file data Pattern is below and i need output as 6 or 3 or 8 or 4 based on the variable value which is eth0 and eth1  eth0RX:6:eth0TX:3|eth1RX:8:eth1TX:4|   Below code works well  sed 's/.*eth0RX:\([0-9]\+\).*/\1/g' $EMSTATE/packetdrop.txt   But fails when I use dynamic variable like below  rxfile=sed 's/.*$iRX:\([0-9]\+\).*/\1/g' $EMSTATE/packetdrop.txt
I want to do:  cat update_via_sed.sh | sed 's/old_name/new_name/' &gt; new_update_via_sed.sh   in my program.  But I want to use variables, e.g.  old_run='old_name_952' new_run='old_name_953'   I have tried using them but the substitution doesn't happen (no error). I have tried:  cat update_via_sed.sh | sed 's/old_run/new_run/' cat update_via_sed.sh | sed 's/$old_run/$new_run/' cat update_via_sed.sh | sed 's/${old_run}/${new_run}/'
All-in-One Event Calendar: Custom Query - Getting each event Instance I use bash on both my Mac and as my cygwin shell. Overall, I'm quite pleased with it.  My one complaint however is that its TAB completion isn't as good as Windows Command Line TAB completion.   For example, if there are two files with the same prefix, then bash just beeps at me when I try to TAB complete. If I keep nailing TAB, then it will eventually show me a list of potential files.  I definately prefer how Windows will cycle through potential files right on the command line.   Is there a way to get bash to operate similar to Windows Command Line in this regard?  If there isn't (I do not want to switch shells), am I missing something about TAB completion in bash? Is there a more efficient way to use it? Suppose $R$ is a ring and every prime ideal of $R$ is also a maximal ideal of $R$. Then what can we say about the ring $R$? Can truesight see through a druid's Wild Shape? The rules for truesight state:     A creature with truesight can (..) perceive the original form of a shapechanger or a creature that is transformed by magic   A druid player argued that since the druid is still a "humanoid" (not a "shapechanger"), and since , a creature with truesight should not see through it.  As the DM, I ruled against it because I believed the intent of truesight is to see through all kinds of shapechanging effects but I was still left wondering if I missed anything. I couldn't find anything about this in the errata either.  So, going by strict RAW, should a creature with truesight be able to see the druid's true form while a druid is using wild shape? I am looking for a good GTD (todo/task/project management) app that has cloud sync. I'd like it to be on my iPhone, iPad and Mac. Web app would be nice, too.  OmniFocus is the closest thing I've found but it seems too expensive.  Things don't have clound sync... only WiFi sync is available for Things.  Do you know of any GTD app I'm looking for? Thanks! Im having a bit of trouble drawing a circuit with a diode in. I know the current flows from negative to positive, but convention says that current goes from positive to negative.  When drawing a circuit with a diode do you draw the arrow pointing to the positive (matching the actual flow of electrons) or towards the negative terminal (matching conventional current)?  If you follow convention then surely when building circuits from the diagram the diode will not allow current as it is actually facing the incorrect way? A guide to moderating comments Complex number operations: telling Mathematica variables are real What do you call a person who started something that is later followed by everyone? Show that $\lim\limits_{a \to 0^+} \int^1_0 ax^{a−1}f(x)dx=f(0)$. Suppose $f$ is Riemann integrable on $[0,1]$ and continuous at 0. Show that $$\lim\limits_{a \to 0^+} \int^1_0 ax^{a−1}f(x)dx=f(0).$$   Can anyone share some insight on this one? I have no idea where to begin. Maybe a substitution? Updating entities in response to collisions - should this be in the collision-detection class or in the entity-updater class? Is it possible to use a laptop as an external monitor? I need to create a multi-monitor setup for my desktop computer but I have no additional monitors with me right now, aside from my laptop. Is it possible to use my laptop screen as an external monitor?  Note that I am not trying to connect a monitor to my laptop, rather, I am trying to connect my laptop screen to a desktop video card (if this is possible). Comments/tips on a (non Latex) pdf including mathematical formulas My goal : I correct copies from students that I scan to pdf. I wish I could make the annotations on the scanned copies rather than on the physical paper. Today, I have to scan the copies again to have my annotations transferable to students by email. Since most of the annotations are similar, I wish to have a stock of annotations I could transfer on the copies.  I went through a lot of technologies, including many "StackExchange Questions" here. I considered pdfcomment, cooltips, fancytooltips, the OCG family (ocgx, ocgp, ocg2, ...), etc.  Two tracks attracted more specifically my attention :    pdfcomments : I like the mouseover to see the comment, the capabillity to move the annotation around so I can have a stock on a pdf and I can copy it onto the scanned copies. This would be my choice if there was not a main drawback : it accepts only plain text when I need to use mathematical notations. (It needs selected pdf readers). Because you can move comments, you can put them on any pdf, even if it is not compiled from Latex or if you don't have the source. fancytooltips : I like the mouseover to see the comment, and the capability to use LaTeX mathematical formulas and images. Drawbacks : I can't move the annotation from a pdf document to the copies. (It works with very few pdf readers.) . I am not sure whether I can put tips on non Latex pdfs.   Is there a way to have pdfcomment have images/Latex mathematical formulas (or references to formulas that can show with a mouseover) ? Or is there a way to transfer fancytooltips to a non Latex pdf ? Or are there other techniques to achieve the goal ? I am working on a print for my wall and I am trying to create something like this:      I have already created the letters in Illustrator and now I am adding the colors in Illustrator and then exporting everything to Photoshop and then using the liquify tool to blend the colors to create a similar effect. I also used the healing patch tool to blend in the hard edges.  Is that the right way of doing it? Or is there another way? Shape with a slanted side (responsive) Why would the command "ls *" generate an error about invalid options? There is a thread that talks about ls "*" not showing any files, but I actually wonder why the simple  ls *   command doesn't output anything in my terminal other than  ls: invalid option -- '|' Try 'ls --help' for more information.   while   ls   will list all the files in the current directories as    1                  ferol                      readme.txt  2                  fichier                    sarku  2018               GameShell                  Templates  22223333          '-|h4k3r|-'                 test  3                  hs_err_pid2301.log         test2  CA.txt             important.top.secret.txt   toto.text  CA.zip             JavaBlueJProject           tp1_inf1070  countryInfo.txt    liendur                   'tp1_inf1070_A19(2) (1)'  currency           liensymbolique             tp1_inf1070_A19.tar  curreny            LOL                        Videos  Desktop            Longueuil                 'VirtualBox VMs'  Documents          Music                      words  douffos            numbers                    Zip.zip  Downloads          Pictures  examples.desktop   Public   Any ideas as to why the globbing doesn't take effect here? I'm on Ubuntu, working in the terminal, I don't know if it makes a difference.  Thanks. Casting two cantrips, both modified by metamagic? Can you cast one cantrip, modifying it with "Twinned Spell" (Fire Bolt) to target 2 creatures, and then cast another cantrip as a Bonus Action (Fire Bolt), using "Quickened Spell" to target one of the previous creatures or another creature? I read this at least 20 years ago, and I believe it was originally published in the '60s.   The main character is a human, but somehow "inherits godhood" from an alien, whose species is very long lived. IIRC this is one of the old-style god thingies, i.e. "god of thunder" not "omniscient omnipotent omnipresent transcendent being".  The plot somehow revolved around identifying and fighting some enemy which, I believe, was in turn a member of the alien species who acted as the avatar of the opposite god in the alien pantheon.  The only thing I remember for sure is that the enemy was identified as "green green" or "gringrin" (sadly, I read this in translation so I am not sure what the original meant) I am trying to solve a problem from Stanley's book, it says:  Fix $k,n \in \mathbb{P}$. Show that: \begin{align} \sum a_1 a_2 \cdots a_k = \binom{n+k-1}{2k-1} \end{align} where the sum ranges over all compositions $(a_1 , a_2 , \ldots , a_k)$ of $n$ into $k$ parts.  I am trying to reason like this:  we need to find the coefficient $c_n = \sum a_1 a_2 \cdots a_k$ from this generating function --  \begin{align} \sum_n c_n x^n &amp;= \sum_n \sum a_1 a_2 \cdots a_k x^n \\  &amp;= \sum_n \sum a_1 a_2 \cdots a_k x^{a_1 + a_2 + \cdots + a_k}\\ &amp;= \sum_n \sum a_1x^{a_1} a_2x^{a_2} \cdots a_kx^{a_k} \end{align}  after that, I have no clue, how do I solve this ?   moreover, what is the range in the inner sum ?    If we consider Mark Riedel's answer, and assume $n=4$, $k=2$; then the sum will be  \begin{align} \sum (z + 2z^2)^2 = z^2 + 4z^3 + 4z^4 \end{align}  On the other hand the compositions will be $(1,3), (2,2), (3,1)$, therefore the above sum will be counted as:  \begin{align} (1.3)z^{1+3} + (2.2)z^{2+2} + (3.1)z^{3+1} &amp;= 1z^1.3z^3 + 2z^2.2z^2 + 3z^3.1z^1\\  &amp;= 3z^4 + 4z^4 + 3z^4 = 10z^4 \end{align}   what's going on? what am I missing? Curious badge bug I saw that it has been already reported that also they have earned courious badge but the badge has not been given. but their answers say that they must wait a day and the badge will be awarded.  In my case its 8/5 and it was 5/5 long time ago and I have never received a message telling that I have earned it. its just telling me that the next badge to be awarded is Curious badge.  this is my profile: