I'm calling the sleep command from awk like so: system("sleep 15m") and found that when I interrupt that with CTRL-C it only interrupts the sleep command, not the script. So I tried wrapping the system function in an if statement, as suggested  and further explained . It then looks like if (system("sleep 15m") != 0) exit 1.  That didn't work, so I tried print system("sleep 3"), which always returns 0, contrary to the stated behavior. Typing sleep 3 then echo $? in the shell produces 0 if I let it run and 130 if I interrupt it.  So what am I missing? I've checked for typos several times, tried the --posix and --traditional switches, and studied the user's guide, nothing changes it.  $ awk --version GNU Awk 4.1.3, API: 1.1 (GNU MPFR 3.1.4, GNU MP 6.1.0) Copyright (C) 1989, 1991-2015 Free Software Foundation.
I'm having an issue with the following piece of (G)AWK script:  do {     ... } while (system("sleep 10"))   My intention is to break the loop when the user presses ^C during the sleep, but it's not working.  I believe the problem is that Bash exits with 0 when interrupted with ^C, at least when it's executed by AWK's system():  $ awk 'BEGIN { print "\n" system("sleep 2") }' (let the sleep complete) 0      $ awk 'BEGIN { print "\n" system("sleep 2") }' ^C 0   Why is it so?   Is this a bug in Bash or in (G)AWK?  Is there a simple solution that doesn't involve complicated Bash-specific syntax like trap?  The best I could come up with is this:  do {     ... } while (42 == system("sleep 10 &amp;&amp; exit 42"))   which still looks like a kludge to me.
Find and Replace Inside a Text File from a Bash Command How to configure splash screen after plymouth I have configured my splash screen for plymouth - and it works perfectly. I've also configured the display manager (I'm using gdm). In between these two I get a very brief splash screen - a kind of swirl of multi-coloured ubuntu like colours. Where does this splash screen get set, and how do I change it?  Edit: Here is a video of my boot sequence, showing the screen in question: Why is my Wi-Fi Process eating >2GB memory Where do I find out how a command/environment is defined? Say I want to redefine the itemize environment, or make a modified version of it. I want to know how it is currently defined. Where do I find this information? If it's some particular package command, I can just look at the .sty file for that package, but if it's something more basic, I don't know where to look...  Is there a reference manual of where all this stuff is explained? Or is there a file in the depths of my texmf tree I should poke around in? Where Can I Give Feedback on Ubuntu? I'm running Ubuntu 11.04 Beta 2. Is there a way, or a place, to give feedback on this system? Not file bugs, just give feedback. If $ \operatorname{Tr}(M^k) = \operatorname{Tr}(N^k)\;\forall 1\leq k \leq n$, then how do we show the $M$ and $N$ have the same eigenvalues? Removing files matching a numeric range regular expression I have a folder which has many files. Some of the data files are labelled 1, 2, 3, ..., 300  I want to remove these data files using the terminal. How do I do this?   I want to do something like   rm some-regular-expression-giving-numbers-from-0--300 So a buddy and I were playing a game of Magic that turned out to be a really quick game because he got  out on the battlefield early. He was tapping it without attacking because of its obviously awesome ability but I don't know if you can tap a creature for its Inspired (untap-triggered) ability without attacking for it to then be tapped. Are you allowed to tap a creature whenever you want? Labels disappear while zooming How do I get the result of a command in a variable in windows? I'm looking to get the result of a command as a variable in a Windows batch script (see  for the bash scripting equivalent).  A solution that will work in a .bat file is preferred, but other common windows scripting solutions are also welcome. If $A|B$ and $B|A$ then prove $A=\pm B$ If $A|B$ and $B|A$ then prove $A=\pm B$   So far I have $A|B \iff AX=B$ and $B|A \iff BY=A$ with $X,Y \in \mathbb{Z}$  Not sure how to finish, any help. Why is the Converse to Lagrange's Theorem False? Simplest way to prevent iTunes from automatically launching when iPhone/iPad is connected When I connect my iPad or iPhone to my Mac iTunes automatically launches. What is the simplest way to prevent this from happening? How to install a QGIS plugin when offline? Due to various IT policies at my workplace, QGIS is installed on a machine that is not connected to the internet. I wish to install a couple of QGIS plugins on this system.  I have downloaded the required plugins from . How do I install them in QGIS? Recovering Outlook .pst password? I am trying to recover an Outlook .pst file password.  Is there some way to do this?  I am using Outlook 2007 and Windows 7. Why don't self-closing script elements work? What is the reason browsers do not correctly recognize:  &lt;script src="foobar.js" /&gt; &lt;!-- self-closing script element --&gt;   Only this is recognized:  &lt;script src="foobar.js"&gt;&lt;/script&gt;   Does this break the concept of XHTML support?  Note: This statement is correct at least for all IE (6-8 beta 2). Will my passport number change when I renew it? I'm travelling soon but need to renew my passport.  Given that I have to provide my passport number to the airline to book a flight, I was wondering if my passport number would change if I renew it.  Or would the number stay the same and the expiry date just change?  I'm asking specifically as an Australian citizen, although I suspect a 'common' answer (if there is a general way this works) might be useful too. Is my mobile AMD card being used? I have a new Sony E Series Vaio with an intel i5 and an AMD 7xxx mobile card. Despite making sure sure my app (game) is set to High Performance in switchable gfx and choosing high performance power plan I'm not entirely convinced the gfx card is being used over the CPU's HD4000 chipset. Is there anyway I can prove for sure the AMD card is being used?  thanks for reading  (OS is Win8 64bit) How to fix Finance::Quote to pull quotes in GnuCash I made the jump from Jumsoft's Money app to GnuCash a while back. It appealed to all my OCD tendencies. I don't know how to use Perl, or stuff of the sort, but with detailed instructions I manage to get things done... when I can find them.  I set up Finance::Quote to pull quotes after I set up GnuCash. I even managed to get it to pull quotes for Korean funds. And every thing had been working well, until tonight. I only get back a pop-up that states "There was an unknown error while retrieving the price quotes." That's where I need help. What can I do?  I dug around and found that it seems that it has something to do with Yahoo Finance ending it's API support. I also learned that Finance::Quote can pull data from many sources, so I don't really understand why one missing API would break it. I also saw that someone out there is trying to use AEX to pull the quotes instead for GnuCash specifically. I found Finance::Quote on cpan (I also first heard of cpan), but I don't understand what I'm looking at. But that's all beside the point. I don't know how to fix this.  Any help would be appreciated. I'm on Windows 10, GnuCash version 2.6.17, and have Strawberry Perl 5.18.2.2-32bit installed.  edit Thanks everyone who responded. It seems to be working more or less. The currency and Korean funds still haven't updated, but you've shown this horse to water. I'll do my best to drink it now. This is what my  looks like when it first loads:    But if we unselect math.SE, we get a y-axis rescaling mess:    I'm using Firefox. I'm in China, so many things involving Google and Imgur are blocked, and I use  to stop the browser attempting to load unloadable Google objects.  I'm hoping other users can check whether or not this issue is localized to my system, and if it's not just me, here's the bug report.