I a trying to grep for certain string after issuing the grpck -n ALL command so when trying grpck -n ALL | grep -i format, for example, I still see the whole output and not just the lines containing the format string.  I know I could direct the output to a file and use grep on that file but it has to be an easier way.  The grpck is just an example as I have noticed other commands that don't support grep.
The script I use is actually returning this output:  (source /Thetra/Commun/env_ora.sh &gt;/dev/null; sh aclenv/arun)  geIlgif0t1 -DVORACLE geIlgif0t1 prg_25900: ACOMP=X geAhadlAd1 -DVORACLE geAhadlAd1 prg_25948: ACOMP=A syCcgge0t1 -DVORACLE syCcgge0t1 prg_26023: ACOMP=S2 syVcalq0t1 -DVORACLE syVcalq0t1 prg_26071: ACOMP=Y syVvali0t1 -DVORACLE syVvali0t1 prg_26119: ACOMP=Y syAedit0t1 -DVORACLE syAedit0t1 prg_26167: (1312) DBMS WARNING: Column not found in table. (-11238)   RETURN (-6)     END  END     END     IF cm_para_f2('VDEF','abQtip_0n1','unicite',syAedit0t1:$v_unicite)&lt;&gt;0      OR null_convert$(syAedit0t1:$v_unicite,'R') &lt;&gt; 'F' THEN SET syAedit0t1:$v_unicite TO 'R'     SET $v_tips_mrgl TO 'S'     SET $v_rfbt_iban, $v_rfbt_intitule, $v_orga_creancier, $v_orga_tip_adr1, $v_orga_tip_adr2,         $v_orga_tip_adr3, $v_code_docu, $v_tips_centre, $v_code_etab, $v_orga_tip_emetteur,  $v_orga_emetteur, $v_rfbt_compte, $v_orga_banque, $v_rfbt_emetteur TO     SELECT rfbt_iban, rfbt_intitule, orga_creancier, orga_tip_adr1, orga_tip_adr2, orga_tip_adr3 ACOMP=N syAvali0t1 -DVORACLE syAvali0t1 prg_26215: (2751) DBMS WARNING: Column not found in table. (-11238)  + to_string_using$(str_to_val$(substr$(clip_str$(to_string$($f_imme_no)),1,4)),'&amp;&amp;&amp;&amp;')         + to_string_using$(str_to_val$(substr$(clip_str$(to_string$($f_sepa_propriete_no)),1,5)),'&amp;&amp;&amp;&amp;&amp;')     IF syAvali0t1:$v_unicite ='R' THEN  SET $v_sepa_rum3 TO $v_sepa_rum3 + substr$(to_string_using$(syAvali0t1:$v_ordr_direct,'&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;'),7,9)     ELSE ACOMP=N syAcalc0t1 -DVORACLE syAcalc0t1 prg_26263: ACOMP=N syAcalc0t2 -DVORACLE syAcalc0t2 prg_26311: ACOMP=N syAcalc0t3 -DVORACLE syAcalc0t3 prg_26359: ACOMP=N   To check for errors I use the following command:  (source env_ora.sh &gt;/dev/null; sh aclenv/arun) | egrep '^ACOMP=$'   Output:  (1312) DBMS WARNING: Column not found in table. (-11238)   RETURN (-6)     END  END     END     IF cm_para_f2('VDEF','abQtip_0n1','unicite',syAedit0t1:$v_unicite)&lt;&gt;0      OR null_convert$(syAedit0t1:$v_unicite,'R') &lt;&gt; 'F' THEN SET syAedit0t1:$v_unicite TO 'R'     SET $v_tips_mrgl TO 'S'     SET $v_rfbt_iban, $v_rfbt_intitule, $v_orga_creancier, $v_orga_tip_adr1, $v_orga_tip_adr2,         $v_orga_tip_adr3, $v_code_docu, $v_tips_centre, $v_code_etab, $v_orga_tip_emetteur,  $v_orga_emetteur, $v_rfbt_compte, $v_orga_banque, $v_rfbt_emetteur TO     SELECT rfbt_iban, rfbt_intitule, orga_creancier, orga_tip_adr1, orga_tip_adr2, orga_tip_adr3 (2751) DBMS WARNING: Column not found in table. (-11238)  + to_string_using$(str_to_val$(substr$(clip_str$(to_string$($f_imme_no)),1,4)),'&amp;&amp;&amp;&amp;')         + to_string_using$(str_to_val$(substr$(clip_str$(to_string$($f_sepa_propriete_no)),1,5)),'&amp;&amp;&amp;&amp;&amp;')     IF syAvali0t1:$v_unicite ='R' THEN  SET $v_sepa_rum3 TO $v_sepa_rum3 + substr$(to_string_using$(syAvali0t1:$v_ordr_direct,'&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;'),7,9)     ELSE   We can see that grep is returning non matching lines.  When I redirect the stderr to stdout with this command:  (source /Thetra/Commun/env_ora.sh &gt;/dev/null; sh /Thetra/Oracle/transfert/P2016.H.1/aclenv/arun) 2&gt;&amp;1 | egrep '^ACOMP=$'   As expected, the output is void.  Why grep is returning non matching lines when stderr is not redirected ?
Lagrangian and Hamiltonian EOM with dissipative force I am trying to write the Lagrangian and Hamiltonian for the forced Harmonic oscillator before quantizing it to get to the quantum picture. For EOM $$m\ddot{q}+\beta\dot{q}+kq=f(t),$$ I write the Lagrangian  $$ L=\frac{1}{2}m\dot{q}^{2}-\frac{1}{2}kq^{2}+f(t)q$$ with Rayleigh dissipation function as   $$ D=\frac{1}{2}\beta\dot{q}^{2}$$ to put in Lagrangian EOM $$0 = \frac{\mathrm{d}}{\mathrm{d}t} \left ( \frac {\partial L}{\partial \dot{q}_j} \right ) - \frac {\partial L}{\partial q_j} + \frac {\partial D}{\partial \dot{q}_j}. $$  On Legendre transform of $L$, I get $$H=\frac{1}{2m}{p}^{2}+\frac{1}{2}kq^{2}-f(t)q.$$  How do I include the dissipative term to get the correct EOM from the Hamiltonian's EOM? Could someone help me prove that given a finite measure space $(X, \mathcal{M}, \sigma)$ and a measurable function $f:X\to\mathbb{R}$ in $L^\infty$ and some $L^q$, $\displaystyle\lim_{p\to\infty}\|f\|_p=\|f\|_\infty$?    I don't know where to start. How do I handle the window close event in Tkinter? How do I handle the window close event (user clicking the 'X' button) in a Python Tkinter program? Consider the atomic spectrum (absorption) of hydrogen.     The Bohr's model postulates that there are only certain fixed orbits allowed in the atom. An atom will only be excited to a higher orbit, if it is supplied with light that precisely matches the difference in energies between the two orbits.   But how precise does 'precisely' mean. Of course, if we need energy $E$ to excite the electron to a higher energy level, and I supply a photon with just $E/2$ I would expect nothing to happen (since the electron cannot occupy an orbit between the allowed ones). But what if I supplied a photon with energy $0.99E$, or $1.0001E$ or some such number. What will happen then?  I think that the electron should still undergo excitation precisely because the lines we observe in the line spectrum have some thickness. Which means that for a given transition, the atom absorbs frequencies in a certain range.   Is my reasoning correct? If not, why? How does Bohr's model explain this? How about modern theory?   If I'm right, what is the range of values that an atom can 'accept' for a given transition? I have some files with TikZ graphics that have suddenly changed appearance since I upgraded to PGF-2.10.  Here is a minimal example:  \documentclass{minimal} \usepackage{tikz} \begin{document} \pgfversion\par \begin{tikzpicture} \draw[blue] plot[domain=-1:1] (\x,{\x^2 + \x^3}); \draw[xshift=4cm,blue] plot[domain=-1:1] (\x,{(\x)^2 + (\x)^3}); \end{tikzpicture} \end{document}   In PGF 2.00 I had this:    while in 2.10 I have this:    The one on the left in PGF 2.10 looks like the graph of y=x^3 but could also be y=x^3 + x|x|.   This has been  on sourceforge and  on the pgf-users mailing list.  Although I haven't checked myself yet, the bug remains open and some of the commenters below report that problems still exist in the CVS version.   Geoffrey Jones notes the bug is in the 2.00 CVS version:     Hi Matthew, not an answer, just an FYI   that's too large for the comment box.   My compile of your code through pgf   v2.00 produces the result you see with   v2.10, above:       I.e., the difference you observe seems   to pre-date v2.10.   There is a workaround by inserting parentheses.  But since I have so many old lecture files I'd rather find a solution that doesn't involve rewriting my TikZ code.  And I'm squeamish about using the CVS bleeding edge code even if it were fixed, since I don't want to introduce other problems.  Ideally I'd like a simple patch that I can stick at the preamble, or just fix one file in the PGF distro. I have the following problem: two groups A and B.  The proportions of married and single are ($p_1$) and ($p_2$) respectively, and the standard deviations ($s_1$) and ($s_2$). The sample consists of  ($n_1$) A and  ($n_2$) B observations.  Now I want to test whether the proportions are equal. I use the following formula to compute the z-statistic:  z = $abs(p_1 - p_2) / \sqrt{ \frac{p_1(1-p_1)}{n_1} + \frac{p_2(1-p_2)}{n_2} }$  and test the hypothesis: h0: $p_1 \neq p_2$  An alternative approach I tried is to estimate the t-value based on the standard deviations (hence just comparing means), that is by the formula (assuming unequal variances):  t = $abs(p_1-p_2)/\sqrt{ s_1^2/n_1 + s_2^2/n_2 }$  My question are:    do you agree with my approach or; should it be two-sided or one-sided?   Thank you. I have received an .rar which I wish to unpack as it contains something rather important to me that I need to really have now. However even though I can view the contents of the .rar archive in the Archive Manager, I am unable to extract it due to this error:    The archive should contain two folders within it, each though contain at least 10 audio files as well as a PDF file each (I don't know what the contents exactly should be except for there should be audio files in there, and the content I have described is what I can see from the Archive Manager's view). So the only thing I am left with except the error is one of the folders and one of the audio files, but it says it has 0 bytes in it.  So how exactly do I fix this problem? I am running Ubuntu GNOME 16.04.1 with GNOME 3.20.  Information Update:  In reply to a comment requesting the output from the dpkg -l unrar unrar-free command:  Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name           Version      Architecture Description +++-==============-============-============-================================= un  unrar          &lt;none&gt;       &lt;none&gt;       (no description available) dpkg-query: no packages found matching unrar-free Color the edges of $K_6$ red or blue. Prove that there is a cycle of length 4 with monochromatic edges. Color the edges of $K_6$ red or blue. Prove that there is a cycle of length 4 with monochromatic edges.  Attempt: I know that i have to...  prove that there must be TWO vertices with “red-degree” at least 3, or two with "blue-degree" at least 3. Call these U and V. (We'll assume we're in the red case; the blue case is similar.) Now, ask if they’re connected by a red edge, and how many red-adjacent neighbors they share. If you analyze this, there should be only a few cases to consider – and each should be relatively straightforward. For each case, you’ll show either that that case can’t actually happen in $K_6$, or that it gives rise to a monochromatic 4-cycle. Multiple arguments in shebang I am wondering whether there is a general way of passing multiple options to an executable via the shebang line (#!).   I use NixOS, and the first part of the shebang in any script I write is usually /usr/bin/env. The problem I encounter then is that everything that comes after is interpreted as a single file or directory by the system.  Suppose, for example, that I want to write a script to be executed by bash in posix mode. The naive way of writing the shebang would be:  #!/usr/bin/env bash --posix   but trying to execute the resulting script produces the following error:  /usr/bin/env: ‘bash --posix’: No such file or directory   I am aware of , but I was wondering whether there was a more general and cleaner solution.    EDIT: I know that for  scripts, there is a way to achieve what I want, documented in  of the manual:   #!/usr/bin/env sh  exec guile -l fact -e '(@ (fac) main)' -s "$0" "$@"  !#   The trick, here, is that the second line (starting with exec) is interpreted as code by sh but, being in the #! ... !# block, as a comment, and thus ignored, by the Guile interpreter.  Would it not be possible to generalize this method to any interpreter?     Second EDIT: After playing around a little bit, it seems that, for interpreters that can read their input from stdin, the following method would work:  #!/usr/bin/env sh sed '1,2d' "$0" | bash --verbose --posix /dev/stdin; exit;   It's probably not optimal, though, as the sh process lives until the interpreter has finished its job. Any feedback or suggestion would be appreciated. My name includes space - How do I enter my username when typing command? My username in Minecraft is sun solar arrow. This name includes spaces. Situation - When I want to get OP privilege, a user who has OP privilege will enter: /op sun solar arrow  But my username includes spaces. So it shows an error message:  Invaild syntax  How do I enter my username? Is my US visa still valid after change in name? I am making a skydome and I have a texture hooked up with an emission shader for it, however, since the dome is blue it only emits blue light. Is there a way that I can have the whole sky illuminated and have the light reaching the rest of my scene be a different colour? I have setup a project of 250 frames with a flag and a wind force field. It works fine until I change the length of the project to 520 frames, then the flag is frozen after frame 250. There must be a simple way to change this. Thanks for any help. Regards, Daniel. Firstly, this is a homework problem so please do not just give an answer away. Hints and suggestions are really all I'm looking for.  I must prove the following using mathematical induction:     For all $n\in\mathbb{Z^+}$, $1+2+2^2+2^3+\cdots+2^n=2^{n+1}-1$.   This is what I have in my proof so far:     Proof: Let $p\left(n\right)$ be $\sum_{j=0}^n 2^j=1+2+2^2+\cdots+2^n=2^{n+1}-1$. Then $P\left(0\right)$ is    \begin{align} \sum\limits_{j=0}^0 2^j=1=2^1-1.\tag{1} \end{align} Hence    $P\left(0\right)$ is true. Next, for some $k\in\mathbb{Z^+}$, assume    $P\left(k\right)$ is true. Then \begin{align}  \sum\limits_{j=0}^{k+1}2^j&amp;=\left(\sum\limits_{j=0}^k  2^j\right)+2^{k+1}\tag{2}\\ &amp;=2^{k+1}-1+2^{k+1}\tag{3} \\ &amp;=2\cdot 2^{k+1}-1\tag{4}\\ &amp;=2^{k+2}-1\tag{5}\\ &amp;=2^{\left(k+1\right)+1}-1.\tag{6} \end{align}   Therefore, $P\left(n\right)$ holds for all $n$.$\;\;\;\;\blacksquare$   Is everything right? My professor went over the methodology in class quite fast (and I had a bit too much coffee that night) and I want to make sure I have it down for tomorrow night's exam. multiple prints on the same line in Python Is a +1/+1 counter I get from, say Unleash or Undying different than +1/+1 from something like  or ? List has no row exception: Queryerror I have below line placed in controller that fires list has no row exception. I just need to show a custom message instead when the query returns no value.   Apex code:  Id CI=[select Compliance_Incident_abv__c from Compliance_Incident_Transaction_abv__c where Name=:selectedCIT].Compliance_Incident_abv__c ;  //**This line throws error**     system.debug('CI@@'+CI);         if(cond != '')             cond += ' and';           else             cond += ' where ';                                        if(CI!=null)          cond += ' Id = \'' + CI+ '\''; Why does the order of parameters matter for sp_trace_create? What does really attracts a water stream to a charged object? I saw  by  and I was not 100% sure about the third phenomena, a statically charged object attracting a stream of water, especially because he explicitly mentioned that it is not due to the  of the water. A week later he uploaded an  all five phenomena and he says it is because of repelled equally charged ions, back up the water flow, such that the water actually falling along the charged object would be oppositely charged and therefore attracted. Here is a still image from the video illustrating this:    However this explanation seems strange to me, since this would mean that this way you could build up a charge in the water which has exited the tap (as well as in the water inside the tap as well). Therefore it should get harder to push those ions back over time, and therefore there also would be a decrease in the attraction of the water (assuming there is no other way to discharge it). I have tried a simple similar experiment, where I catched the water leaving the tap in an insulated bowl, but I did not notice a decrease in attraction.  There a couple of reasons why my experiment does not rule out his theory:   I was holding the charged (plastic) object by hand, which caused that its distance to the water stream varied, making it difficult to observe a decrease in attraction. I only conducted my experiment for roughly 30 seconds, which might be enough time for a opposite charge to build up.   The reason that he mentioned why permittivity can't cause this phenomena is because the electric field would be homogeneous and therefore the attractive and repulsive force of both dipoles of a water molecule would cancel out. However the electric field would only be homogeneous if the charged object would be an infinitely large plate, which it isn't. Thus water molecules would be attracted to the charged object. In order to make the permittivity theory more plausible I thought of maybe doing a order of magnitude calculation to see if it could generate a large enough force would be able the water stream by the observed amount. However I do not know what a good guess would be for variables such as the amount charge on the charged object and how the electric field would fall off over distance.   So, my question is whether his theory is really correct, or if the permittivity of the water can cause it. Performance of try-catch in php What kind of performance implications are there to consider when using try-catch statements in php 5?   I've read some old and seemingly conflicting information on this subject on the web before. A lot of the framework I currently have to work with was created on php 4 and lacks many of the niceties of php 5. So, I don't have much experience myself in using try-catchs with php.