If I have a text file with this content:   someline  &lt;!--\       file first read on 2015/01/11   And I want to delete &lt;!--\ and everything until what comes after "on", how do I do it? The expected output would be this with the example above:  someline 2015/01/11   I can't make a pattern that extracts dates, because 2015/01/11 can be just Sunday or Yesterday or almost anything else. read can also be anything. I tried this with BSD sed:  sed 's/&lt;!--\      file first .* on//g'   But when I run this command, I get this error:  sed: 1: "s/&lt;!--\         file f ...": unterminated substitute pattern   So I tried backslash escaping &lt; and ! but I got the same "unterminated substitute pattern" error. I tried to install GNU sed and do the same thing except \n, I also tried gsed 's/&lt;!--:a;N;$!ba;s/\n/file first .* on//g' but I got:  gsed: -e expression #1, char 22: unknown option to `s'   Can sed not do this? If not, how do I do it with any other tool/language?
I've noticed that, if I add \n to a pattern for substituting using sed, it does not match. Example:  $ cat &gt; alpha.txt This is a test Please do not be alarmed  $ sed -i'.original' 's/a test\nPlease do not/not a test\nBe/' alpha.txt  $ diff alpha.txt{,.original}  $ # No differences printed out   How can I get this to work?
How to make existing public files private? The problem is this:      Suppose $I \subseteq R$ is a nilpotent ideal and there is $r \in R$ with $r \equiv r^2 \pmod I$. Show $r \equiv e \pmod I$ for some $e \in R$ idempotent.   I have spent a few hours rolling around in abstracta with no destination. I believe that if I could write down a concrete example of this, the example could guide me through the abstract definitions and show me where to look for an idempotent in $R$. I have looked at 2x2 matrices and could not find any such examples. Might anybody have one? When trying to add a bit more detail to a related , I realized I don't know how to specify which one of the available Bash word types to execute. According to help type there are five word types:   alias keyword function builtin file   It's possible for a word to have several types (true is just an example; a more commonly overridden word would be cd):  $ type -a true true is a shell builtin true is /bin/true   How do you force the execution of a specific synonym? So far, in order of precedence:   alias: This is a special case since it has precedence over all the other synonyms. Forcing this would only be useful when the command should fail if the alias is not defined.  $   keyword:  $   function:  $   builtin:  $ builtin true  file:  $ command true $ $(which true) $ /bin/true    :   Quoting a word excludes aliases and keywords. That is,  $ 'true'   will run only the function, builtin or file. Vim: How do I search for a word which is not followed by another word? Is it possible to change the line style in a tikz figure in the same \draw command?  I am looking for something like:  \documentclass[tikz]{standalone} \begin{document}     \begin{tikzpicture}         \draw[style1] (0,0) -- ++(1,0)  **CHANGE STYLE** -- ++(1,0);     \end{tikzpicture} \end{document}   The main motivation is that I don't want to loose the relative coordinate as I go on with a long \draw command. On this link (Sentinel1  for a SLC product), the resolution is written as a range from the highest corresponding to low incidence angle, to the lowest resolution corresponding to high incidence angle.  My question is how is the resolution related in general to the incidence angle? And if they are really related, why is the resolution affected by the change in the incidence angle? How to convert date to timestamp in PHP? How do I get timestamp from e.g. 22-09-2008? Why do some tag info pages show who created them and others don't? Some  show who created the tag:    while  don't. I'm pretty sure I created that one as well, if you hover over the timestamp you can see when it was created:    which more or less matches with  where I created the tag:    I understand that some tags like  were probably created by the Community user while the site itself was created (so it ), but some newer tags like   even though  still has an account here.  What's going on here? Would this also mean I wouldn't get a  for  if I ? Selecting features that do NOT intersect in ArcGIS Desktop? Why doesn't 2.__add__(3) work in Python? Is there a way to view &amp; modify the code of standard lightning components that are visible when editing the Napili template in the community builder. I was wondering if I could modify some of the code and use it as lightning out. Let $x,y,z>0$ and $x+y+z=1$, then find the least value of ${{x}\over {2-x}}+{{y}\over {2-y}}+{{z}\over {2-z}}$ Let $x,y,z&gt;0$ and $x+y+z=1$, then find the least value of  $${{x}\over {2-x}}+{{y}\over {2-y}}+{{z}\over {2-z}}$$  I tried various ways of rearranging and using AM > GM inequality. But I couldn't get it. I am not good at inequalities. Please help me.  I wrote $x$ as $1-(y+z)$ and I took $x+y$ as $a$ and the others as $b$ and $c$. And I am trying. My question is how would I go about proving this?     Prove that $R$ is a local ring if and only if all elements of R that are not units form an ideal.   I understand that I need to prove both directions so:  $(\Rightarrow)$ Local ring means has a unique maximal ideal, so I want to show that this implies the elements are not units.  $(\Leftarrow)$ non unit elements of $R$ form an ideal, so if I show this is unique maximal ideal I can then conclude local ring?  Any hints would be appreciated. Snap application doesn't see files from another partition I have installed KeePassXC snap package on Ubuntu 17.10. I have multiple linux systems installed on the same drive, so I have made most of my home folders like ~/Documents created as links to a separate ext4 partition (users have same uid so permissions are correct). I tried to open my passwords' database which I have inside Documents, but keepassxc cannot see any files inside Documents. If I put the file in my home folder then it sees it.  Are snap packages able to find files outside from my home folder? Any way to make KeePassXC (and the rest snap packages) access the files at my separate ext4 partition (maybe some configuration somewhere)? Math contest integer triplet problem: $x + y + z + xy + yz + xz = xyz − 1$ "Users" folder shared with everyone Today I found something strange on my newly installed Windows 7 OS - my "users" folder C:\Users was shared and "Everyone" had full access... I disabled that and now it seems fine, however I'm a bit scared actually, I'd like to know what caused that and if my system is compromised. My question is simple, why do we believe  to be absurd? Is the Ultra-violet catastrophe incorrect or is it only because we can not create or know of a perfect emitter? I am a bit confused as to why Quanta was necessary. What do repeating '^@' symbols in a logfile mean? A few times I have come across this in a log file:  Sep 17 09:35:57 00187d378926 ovpn-00187d378926[1701]: /sbin/ifconfig tun0 0.0.0.0 Sep 17 09:35:57 00187d378926 kernel: Kernel logging (proc) stopped. Sep 17 09:35:57 00187d378926 rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1707" x-info="http://www.rsyslog.com"] exiting on signal 15. ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@   What does it mean?  Sometimes it is a single line, other times it is lots of lines.  I usually see it happen on Debian 6 machines. How can I attach a file to a post? I want to attach some files to a post on one of Stack Exchange sites. What is the best way to do this? In electrostatics, why the electric field inside a conductor is zero? In electromagnetism books, such as Griffiths or the like, when they talk about the properties of conductors in case of electrostatics they say that the electric field inside a conductor is zero.  I have 2 questions:    We know that conductors (metallic) have free electrons which randomly moves in all directions, so how come we can talk about electrostatics which by definition means stationary charges? When the textbooks try to show why the electric field inside a conductor is zero they say let us put our conductor in an electric field. What happens then is that there will be an induced surface charge density which consequently induces an electric field within the conductor such that the total electric field within the conductor will be zero. That is perfectly understood, but my problem is the following: the original claim was that the electric field within a conductor is 0, not the electric field after putting the conductor in an external electric field it became zero. I do not understand the logic!