How to stop "tail -f" within a running script? How can you stop a tail -f command after seeing a specific string/word?  I'm trying to follow an expanding log and stop the tail after finding a specific word. Is there any kill command for that? I'm just starting with UNIX.
`tail -f` until text is seen I've got a CI server with a command-line interface that allows me to remotely kick-off a job (jenkins CI server and the jenkins-cli.jar tool).  After I kick the job off I tail -f the log (sorry for the messy command):  ssh -t my-jenkins-host.com "tail -f \"/var/lib/jenkins/jobs/$job_name/builds/\`ls -ltr /var/lib/jenkins/jobs/$job_name/builds/ | grep '^l' | tail -n 1|awk '{print \$9}'\`/log\""   After the job successfully completes, usually after at least 5 minutes, I get the following line on the output:  Finished: SUCCESS   Is there a good way to stop tailing the log at this point? i.e. is there like a tail_until 'some line' my-file.log command?  BONUS: extra credit if you can supply an answer that returns 0 when SUCCESS is matched, 1 when FAILURE is matched, and your solution works on mac! (which i believe is bsd based)
MacBook Pro - FaceTime HD Camera - Hardware "Failure'? System Report>Camera>No video capture devices were found     USB>Device Tree> No FaceTime HD Camera (inbuilt)listed    What can be the cause for "camera hardware failure"? Could faulty iSight cam wifi antenna cable linkage between logic board and camera board (in display)result in Camera hardware not "found"? Projection is an open map Let $X$ and $Y$ be (any) topological spaces. Show that the projection  $\pi_1$ : $X\times Y\to X$   is an open map. What are the requirements for national parks? I'm trying to place a national park here:    But the button to create one with the Naturalist is greyed out:    I know the civopedia lists the requirements for building a national park, but they are either wrong or I'm having a hard time understanding them:   The tiles must be natural wonders, Mountains or a tile with an Appeal of Charming or better. As you can see the top are both Breathtaking and the bottom ones are part of the Great Barrier Reef wonder All four tiles must be owned by the same city. All tiles are within the boarders of Mbwila The tiles for a diamond shape. All tiles are connected close to each other in a diamond shape No tile can have an improvement or district on it. All tiles are in their initial condition.   So I'm probably missing something. Can someone tell me what's the problem? Why don't we consider centrifugal force on a mass placed on earth? Let us say a block of mass is placed on the surface of earth. Then while drawing the forces on that body, we say:   Force $F = mg$ acting towards the center of Earth. Normal reaction $N$ offered by the surface of Earth.   If no other forces are acting, we say $F=N$. But what about the centrifugal force $m\omega^2R$ . Why don't we ever bring that into picture? What am I missing? How to create individual chapter PDFs from included TeXs? My document structure has   one file with preamble (i.e. MainTex) and around 75 individual .tex files (i.e. Chapter_01, Chapter_02, ..., Chapter_75) representing each chapter.   I am using \include command to create a one big PDF file, the output is MainTex.pdf. Life is all good up to this point.   If I have to create individual PDF for each chapter then do I need to run 75 times with each chapter name and rename the PDF manually to match to chapter name. Because if I include only Chapter_01 and run it creates PDF named as MainTex.pdf.  Is there a way I can automate this workflow? If $[\cdot]$ denotes greatest integer function, then what is the value of natural number $n$ satisfying the equation $$[\log_21]+[\log_22]+[\log_23]+\dots[\log_2n]=1538 ?$$   My try:  Note that  $$0+1\times2+2\times2^2+3\times2^3+4\times2^4+5\times2^5+6\times2^6+7\times2^7=1538$$  But the answer is $$n=\sum_{i=0}^72^i=255.$$  How is it derived? SqlServer: can one table's PK be the FK of two table's? I have three tables project, users and proj_user. The PK of proj_user table is the FK of project and users table's pk e.g.(project_id,user_id)  My question is, is it possible if the project_id and user_id's data is different  like project_id = '12345' and user_id = 'abc987'  Please reply  kind regards Vivek Determining the number of bit strings of length n that contains no adjacent 0s • $C_n =$ this number of bit strings  • A binary string with no adjacent 0s is constructed by   Adding “1” to any string w of length $n-1$ satisfying the condition, or Adding “10” to any string v of length $n-2$ satisfying the condition   I still don't find that intuitive at all. Why adding up $C_{n-1} + C_{n-2}$ results in $C_n$? I have tried my best and asked my friends for help, but they find the formula unintuitive as well. Could anyone here come up with a clear explanation? Thanks! Infinite algebraic extensions of $\mathbb{Q}$ I need help to solve the following exercise:   If $K$ is an algebraic extension of $\mathbb{Q}$ (finite or infinite), then we let $O_{K}$ denote the ring of algebraic integers in $K.$ If $\frak{P}$ is a prime ideal of $O_{K}$ then $\frak{P}∩\mathbb{Z}$ is a prime ideal of $\mathbb{Z}.$ Moreover, if $\frak{P}$ is non-zero, then so is $\frak{P}∩\mathbb{Z}$ . Thus $\frak{P}∩\mathbb{Z}=$$ p\mathbb{Z}$ for some prime $p.$ Show that $O_{K}/\frak{P}$  is a field, and is an algebraic extension of $\mathbb{F}_{p}$; then show that it is Galois over $\mathbb{F}_{p}$ with abelian Galois group.  Now suppose that $K/F$ is a (finite or infinite) Galois extension. Let $\frak{P},$  $O_{K}$ be as before and put $\frak{p}=\frak{P} \cap $$O_{F}$, a prime ideal of $O_{F}.$  Show that $\mathrm{Gal}(K/F)$ acts transitively on the set of prime ideals of $O_{K}$ above $\frak{p}.$   Thanks in advance Clear 301-redirect cache in Firefox Is it possible to clear only 301-redirects from Firefox's cache? CTRL+F5 doesn't do the job since you just reload the target without caching but do not clear the cached redirect.  An option to disable caching of those redirects completely would be fine, too - but some way (possibly through an extension) to remove those cached redirects would be better.  Note: I'm not looking for answers that disable all caching (including CSS, JS, etc.) How to hide notification center button in Mountain Lion? I am using Mountain Lion.  The only advantage (for me) over the gesture is that Option + clicking the button enables/disables showing alerts and banners (toggles the switch in the notifications center).  Is there a way to hide the button in the status bar that opens notification center? I'd like to remove my phone number from my iMessage account, but still have my phone enabled to receive messages sent to my email address (also used on iPad, Mac). Is there a way of doing this? How do I restrict scaling to a specific axis? Im new to Blender but have some experience with 3dsmax. In blender, when i select some polys and try to scale them, i have no control on the amount and especially relative axis on which the scale would happen, where as with 3ds max i could scale restricted to x, y, z or any combination of using the handy widget. Is there a way to replicate this, or to get any control over the scale ?  thanks, Is there a way to prevent those pesky .DS_Store files from being ever created? Is there a way (eg. a binary hack into Finder) to stop it from creating .DS-Stores on LOCAL Volumes?   I am using Leopard, therefore these don't work:    (requires Lion)  (requires Snow Leopard)   Also,  slows down my computer. Does the Sun produce audible sound? Quick question about ideals of field $F$ in $F[x]$ are principal. Just got a question about ideals of $F[x]$ being principal with $F$ being a field.  The proof basically starts assuming $g(x) \in N \subset F[x]$ where $N$ is an ideal and $g(x)$ is a minimal degree element. The rest is just deducing the what the division algorithm says.  But my question is that shouldn't we let $g(x)$ be arbitrary? Why are we choosing the minimal element? I'm trying to mount my HDD,  /dev/sdb, which is connected via an enclosure but every time I try do so I get an error message   mount: /dev/sdb: can't read superblock   How do I solve this problem and mount my HDD? Explicitly calling a default method in Java When will my phone get the Android 2.3 update (Gingerbread)? Chrome phishing warning on main