How do I make this script search through all users' home folders and then rm -f the files matching EXT? Right now it's only deleting the files matching EXT in the current folder where I am executing the script.   #!/bin/bash EXT=jpg for i in *; do   if [ "${i}" != "${i%.${EXT}}" ];then     echo "I do something with the file $i"     rm -f $i   fi done
I want to delete all *.o files in a directory and its sub-directories. However, I get an error: sashoalm@aspire:~/.Workspace.OLD$ rm -r *.o rm: cannot remove `*.o': No such file or directory  On the other hand, rm *.o works, but it's not recursive.
Summability vs Unconditional Convergence I'm reading that summability and unconditional convergence are the same. (At least if the index set is countable, so unconditional convergence makes sense.)  Then unconditional convergence is nothing else than convergence of the net of all rearranged partial sums. Thus uniqueness of the limit becomes fairly easy as the limit of every net in a Hausdorff space is unique.  But the usual proof deals with separating functionals on Banach spaces, which is a much more serious technique. So I think there must be a hook in my reasoning. Can somebody resolve this issue? Thanks a lot!  Best Regards, Freeze_S I am looking for easy(!) counterexamples that the product of two quotient maps is not necessarily a quotient map and that the quotient space of a Hausdorff space is not necessarily Hausdorff. Can you supply arguments to the map(&:method) syntax in Ruby? I am trying to proof the following algorithm to see if a there exists a path from u to v in a graph G = (V,E).   Reach := {u} LastCardinality := 0 while LastCardinality &lt; |Reach| do   LastCardinality := |Reach|   Next := null   foreach i &lt;- Reach do     foreach j &lt;- V do       if(i,j) exists in E then         Next := Next + {j}   Reach := Reach + Next return Reach   So far I have got that the output needs to be Reach = Goal where Goal = {r | r exists V, there is a path from u to r}. I also have three invariants that I am pretty sure will help prove this.   Reach is always a subset of Goal and Next is always a subset of Goal. After an arbitrary K times through the while loop, for every t that exsits in V, if t has a path of length k+1 from u, then t exists in Reach If Reach is a subset of Goal before the while loop then LastCardinality &lt; |Reach|   I know that to finish up the proof, I need to prove termination, the invariants, and correctness but I have no idea how. I think I need to use induction on the while loop but I am not exactly sure how.   How do I proof those three characteristics about an algorithm? Why does Stack Exchange use Imgur over Amazon S3 or Azure? What benefit does  offer over , , etc. for image hosting?   Is it the simplicity of integration? The cost model? What's better about using a "gateway"? I have noticed that if you look directly at tubelight (I have only white ones in my home) and close your eyes little, you see little random shaped colourless things sometimes with slow speed and sometimes with falling down.   They are shaped like circles with something in between and in chains of random length.   My father has also seen them. So, I am sure I am not imagining things. What the hell are they? I've encountered issues posting comments or answers numerous times over the last month, I've narrowed it down that it only occurs when I use UNION and ALL next to each other (ie SQL).  If I separate them by a dash it works fine. The error is always generic:  'An error occurred during ____ submission'  The blank being either comment or answer. Someone suggested I post this question here.  I do not see a similar question, interestingly even trying to search the site for UNION and ALL errored, similarly separating them with + returns an error. Screenshot:  This occurs in Chrome or IE, on Win 7, will test tonight from personal machines. UPDATE:  Apparently through good coincidence I just never had attempted to use UNION ALL when answering questions from home, works fine here.  So it must indeed be some firewall/policy setting at my office with very specific criteria, never found any other code bits I couldn't post, and don't have a problem with UNION ALL on other sites.  Still interested to find out how it's being blocked given our high level of access. I'm unable to uninstall MATLAB;  sandeep@sandeep-VPCEH28FN:~$ sudo rm /var/tmp/lm_TMW* [sudo] password for sandeep:  rm: cannot remove '/var/tmp/lm_TMW*': No such file or directory sandeep@sandeep-VPCEH28FN:~$ sudo apt-get purge matlab E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? sandeep@sandeep-VPCEH28FN:~$ sudo apt-get purge matlab-support E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? sandeep@sandeep-VPCEH28FN:~$ How to make GRASS and SAGA tools capable to use in QGIS？ I installed QGIS, GRASS and GDAL by OSGeo4w package, and as I finish the installation, I want to use GRASS tool, I face this problem：    But I already installed GRASS and SAGA, how to make those tools in QGIS to be used？ Read integers from external data file to document programming code in LaTeX I am attempting to document my MATLAB programming code in LaTeX. For  this, I use the mcode package, which defines the MATLAB lstlisting  environment. With the commands  \newcommand{\mfileMain}{main.m} \newcommand{\mfileMainFirstNumber}{\mfileMainFirstLine} \newcommand{\mfileMainFirstLine}{26} \newcommand{\mfileMainLastLine}{33} \lstinputlisting[firstnumber=\mfileMainFirstNumber,                  firstline=\mfileMainFirstLine,                  lastline=\mfileMainLastLine]{\mfileMain}   I set the firstnumber, firstline and lastline parameters and use  them to import a piece of MATLAB code into the LaTeX document with  \lstinputlisting. However, when I add some code before the  \mfileMainFirstLine, in this case 26, the code is shifted and the  documentation is ruined. To fix this, I would have to update the line  numbers.  I am trying to fix this issue by adding 'tracers' to my MATLAB  program. I use the commands  filename=['lstinputlisting_line_numbers_' mfilename '.txt']; fileID=fopen(filename,'w');   to create a text file in which I store the line numbers for which the  code is documented using the command  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);   . This results in a text file lstinputlisting_line_numbers_.txt with  content for instance like  53 62 75 91   in case I want to document four parts of the MATLAB program main.m.  What I want to do from here is simply use this line number data in the  \lstinputlisting commands. Perhaps it is possible to store the line  numbers in the \newcommands{}{}, or perhaps there is a better, more  elegant way of doing it. In this way, the line numbers would update  automatically in case I add new lines of code. Consequently, my LaTeX  document would still be okay, saving me a lot of time not having to  update the line numbers myself.  A minimum working example could look like the following. The LaTeX file  main.tex would have the content  \documentclass[a4paper]{article} \usepackage[framed,numbered]{mcode}  % Data for the 'lstinputlisting' environments. \newcommand{\mfileMain}{main.m} \newcommand{\mfileMainFirstNumberA}{\mfileMainFirstLineA} \newcommand{\mfileMainFirstLineA}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainLastLineA}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainFirstNumberB}{\mfileMainFirstLineB} \newcommand{\mfileMainFirstLineB}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainLastLineB}{WHAT SHOULD I PUT HERE?}  \begin{document}     In the code     \lstinputlisting[firstnumber=\mfileMainFirstNumberA,                      firstline=\mfileMainFirstLineA,                      lastline=\mfileMainLastLineA]{\mfileMain}     we calculate the ....       And in the code     \lstinputlisting[firstnumber=\mfileMainFirstNumberB,                      firstline=\mfileMainFirstLineB,                      lastline=\mfileMainLastLineB]{\mfileMain}     we calculate the..... \end{document}   . The MATLAB file main.m would have the content  %% Line number output.  filename=['lstinputlisting_line_numbers_' mfilename '.txt']; fileID=fopen(filename,'w');  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);     %% Input to be specified by user.  alpha=10; % PDE parameter. x_s=0; % Starting coordinate. x_e=1; % End coordinate. N_n=1e2+1; % (N)umber of (n)odes. N_ip=2; % (N)umber of (i)ntegration (p)oints.  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);     fclose(fileID); % Close the file 'fileID'. How to remove or hide the GRUB boot menu? Trying to remember a book about a human male travelling to alien planet I listened to this on audiobook and it was great.  The premise was a human ends up travelling to an alien planet. The aliens have a perimeter to their 'base' that is under constant attack from the planet's animals. It is revealed towards the end that there is some sort of signal being transmitted that is making all the animals and plant life attack a certain point on the planet (where the aliens are).   Other major plot points I remember: The human traveller falls in love with an alien. The aliens have a sort of virtual training environment that simulates life outside the perimeter, where plants attack you etc. There is a secondary alien group that the human ends up with, and although they are rivals to other group, they have a trade set up.   Any help much appreciated! Thanks. I installed nginx a while ago using the ubuntu PPA repository.  Now I want to compile nginx from source so I can compile in and use the geo-ip module.  I know how to compile the new nginx from source.  How can I remove the nginx binary which was installed by the package?  I want to leave all the configs and logs and upstart stuff etc untouched.  I really just want to remove the old binary.  How can I do this? Just upgraded to Mountain Lion and I have to buy iPhoto again? Invalid group name: Group names must begin with a word character I received the following exception when I was using the Regex class with the regular expression: (?'named a'asdf)  System.ArgumentException: parsing \"(?'named a'asdf)\" - Invalid group name: Group names must begin with a word character.   What is the problem with my regular expression? Every time I try to do something seemingly-simple in CSS, it doesn't work.  I have a content div that contains a 460x160 image. All I want to do is position the image at the bottom-right corner and wrap my text around it.  &lt;div id="contents"&gt;     &lt;img src="..." /&gt;     text text text text text text ... &lt;/div&gt;   So I want it to look like:  ------------------ | text text text | | text text text | | text text -----| | text text |    | ------------------   Doing it with a top-left or top-right image is cake:  #contents img { float:right; }  ------------------ | text text |    | | text text -----| | text text text | | text text text | ------------------   Now how do I push that to the bottom? The best I've come up with so far are:  #contents img { float:right; margin-top: 90%} // really needs to be 100%-160px  ------------------ | text text      | | text text      | | text text -----| | text text |    | ------------------   In this case the text does not print in the margin, so there is white space above the image.  #contents { position:relative; } #contents img { position:absolute; right:0; bottom:0; }  -or-  // move the img tag under the text in the html and: #contents img { float:right; margin-top:-160; }  ------------------ | text text text | | text text text | | text text -----| | text text | te | ------------------   In this case the text prints over or under the image.  So... how can I accomplish this? How do I show that $x$ is a root of $p(x)$ in $F[x]/\langle p(x)\rangle$? Let $F$ be a field, and $p(x)$ an irreducible polynomial in $F[X]$. Define $K=F[X]/\langle p(x)\rangle$. For every $a\in F$, denote $\bar{a}=\left&lt;p(x)\right&gt;+a$. How do I show that $\bar{x}\in K$ is a root of $p(x)$?. Infinitely many primes for quadratic residues I have a laptop with a full keyboard (it has numpad), but the laptop is not that big, and because of that the keys are relatively small, which means I am constantly finding myself pressing keys accidentally on the numpad part.  Is there a way to disable specific keys that I simply don't want? Where can I find good ConTeXt documentation