I have used Automator Application to create application(.app which runs by double clicking). It runs commands which executes command one by one. Every command takes 2-3 minutes. What I want to achieve is show percentage progress after completion of every command.    In above image percentage is always zero. I want to explicitly set progress after completion of every command. I also know this is possible using AppleScript but I want to implement in bash script.
When scripting in bash or any other shell in *NIX, while running a command that will take more than a few seconds, a progress bar is needed.  For example, copying a big file, opening a big tar file.  What ways do you recommend to add progress bars to shell scripts?
How to prove this result involving the quotient maps and connectedness? Given topological spaces $X$ and $Y$, where $Y$ is connected, let $p \colon X \to Y$ be a quotient map. If, for each point $y \in Y$, the set $p^{-1}(\{y\})$ is connected, then how to prove that $X$ is connected also?   By the map $p$ being a quotient map is meant the following:   The map $p$ is surjective, and, for any subset $V$ of $Y$, the set $V$ is open in $Y$ if and only if $p^{-1}(V)$ is open in $X$. Insert issue with arrays Showing arrowheads in line end using QGIS? Relationship between balloon size and pressure I see numerous websites talking about how a small balloon is at higher pressure than a big balloon. This is a fun counter-intuitive factoid... unless it isn't a fact at all.  Young-Laplace gives  $$T = \Delta p \frac R2 $$  Which means that for a given tension, increasing the radius does decrease the pressure. But why would the tension be constant? A latex balloon is like a 2D spring, right? So the tension in a inflated spherical balloon should be proportional to the surface area, correct?  $$T \propto R^2 $$  But this gives  $$\Delta p \propto R$$  Which means the bigger the balloon, the higher the internal pressure. Which, again, would be the normal intuition - but it would burst the bubble of some simplified explanations. (har har) My actual question is to find the number of transversal given a collection of set ...  After a little bit of study it has come down to:  How can we count the number of matchings in a bipartite graph with parts of size $m$ and $n$ such that it covers all $m$ vertices of the first part, $m \le n$?  I already know that there is a way to count the number of perfect matchings in a bipartite graph with $m=n$ using the permanent of its (square) incidence matrix. How to install a dictionary (danish) in Texmaker Is it possible to know who voted my question/answer up or down? If not, then is it possible to include this feature? By this feature we can come to know if you are being voted up by question owner or persons giving other answers to same question or just the visitors of that question thread.  Like...  If it is a group of people giving other answers, then your answer is most correct If it is readers of that question, then your answer is more popular How to get the Runtime-Type of an Object dynamically (for Primitive Data Types and SObjects) Is it possible to get the Type of an Object (it's not an SObject)?  String s = 'test'; doSomething(s);  public static void doSomething(o Object) {     // need to find out if o is a string or an integer     type = IsThereAMethodToGetTheTypeOf(o) // ?     if(type='String') {         // do something for strings here ....     } else {         // do something else ....     } }   I think the Type class can't help me, because it has no way to get the type of an existing object instance, right? Any there any other way?  Since there is most likely no perfect solution possible within the current platform limitations, I posted an Idea on IdeaExchange here:   For SObject I have already this  public static string getType(SObject obj) {     if(obj==null) return '';     return obj.getSObjectType().getDescribe().getName()+''; } When to answer vs when to just comment How do you know if something you want to say should be an answer or just a comment?  I assumed that anything that answers the question should be in an "answer" field, and clarifications should be under "comment". But I found this question () in the English Stackexchange site.  The original question asks for words related to the word "chain" and all the answers so far were provided via comment to the original question, instead of in a separate answer field.  Is this the recommended way to answer a question that requires only one-word answers? Or should the comments to the original question be converted to answers instead? A story about a guy who helped humanity by being held in a prison I remember a story I have read buy could not remember the author the name or anything apart from the basic plot. The story is about some future where humanity has to fight with some aliens (not 100% sure). The story tells about a guy who was some kind of activist and who was in a prison two or more times and somehow helped humanity by being held in a prison (can't remember details). I think the story starts by saying that there is a statue in his honor that is not very well known but he did more to help humanity than famous politicians.   The story is most likely written by some famous English-speaking author, though I read it in a translation. VirtualBox - how to increase video memory? Find a closed formula for $\sum_{n=1}^\infty nx^{n-1}$  I am trying to use the derivative of generalized binomial theorem, $\frac{d}{dx}[(x+1)^r=\sum_{n=0}^\infty \binom{r}{n}x^n] =r(x+1)^{r-1}=\sum_{n=1}^\infty \binom{r}{n}nx^{n-1}$  However, I am not sure how to "get rid" of the binomial term. I am running centos 5.8 with cpanel. Lately I am getting reports that my swap is full , but there is a lot of free memory  to use.  top - 10:33:43 up 133 days, 17:00,  1 user,  load average: 0.05, 0.03, 0.05   Tasks: 170 total,   1 running, 169 sleeping,   0 stopped,   0 zombie   Cpu(s):  2.1%us,  0.5%sy,  0.0%ni, 97.2%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st   Mem:  24726100k total,  8255368k used, 16470732k free,   599560k buffers   Swap:  1046520k total,   984740k used,    61780k free,  3641828k cached     How do I solve this? The unused ram memory should be used instead of the swap. Or should I increase the swap ( and how do I do that ? ).  Thanks Oxford Comma Conventions According to the Wikipedia page for the , "Use of the comma is consistent with conventional practice" and "Use of the comma is inconsistent with conventional practice." Did the Oxford Comma come before its omission, or was the Oxford Comma traditionally omitted?  It makes logical sense that every item in a list would be separated in the same way: by a comma. If the Oxford Comma is conventionally correct, when and why did people begin to omit it? Get in vs. get on Possible Duplicate:          I'm an EFL (English as a foreign language) teacher and I haven't been able to come up with a good principle for which preposition to use after get when referring to transportation.  Some examples:   Get in:   a car/taxi/van/truck, etc.  Get on:   a bus/plane/bike/truck, etc.    How can one choose whether to use in or on? Note that in some cases, such as the example with truck, either preposition is possible but the choice affects the meaning.  I've been telling my students that there is no rule, so they just have to memorize which preposition to use, but I'm really hoping I'm wrong.  This question would be better suited for the upcoming  Stack Exchange, but it hasn't entered beta yet. More . Understanding the formula for the Confidence Interval of the difference between two sample proportions Remove duplicate fields in a given column (after ID check) C# Mono - Low Level Keyboard Hook I'm using code that I found on the .  The only problem is it uses external DLL calls that don't work in mono.  I was wondering if anyone knew of a way to accomplish the same thing as that code, but will run in both Windows using .net, and Linux using mono?  Edit:  Clarifying what I'm trying to do: I'm making a .  The program sits in the system tray and when the user presses the hot-key, it will pop up all the gadgets.  So the program doesn't have focus, so typically it won't catch any keystrokes, so I'm using the low-level keyboard hook and I hook the two keys that the user defines as the hot-keys.  But I'm using a Windows DLL call for that, which doesn't work in Linux using mono.  So I'm wondering if there's a way to do the same thing, but will run in Linux using mono? Server login attempts NOT blocked after configuring fail2ban So, I installed (and configured) fail2ban on three Ubuntu VPS servers. I configured (imo) a maximum of 3 failed login attempts (via Putty as root) within 2 minutes. Then I restarted the fail2ban service (according to ).    But when I look at my auth.log files in /var/log/ I still see 4, 5 or more failed attempts from certain IP's. So obviously I did something wrong as the IP is not blocked after 3 failed attempts.   It might have to do something with iptables, but that's where it gets a bit "foggy" for me..   Not sure how to setup a max-three-failed-login-attempts rule..  Additional: I see that the login attempts mostly have different ports for every attempt. Does that influence the count to max-three?  Because I see a port being "poked" twice and then no more attempts. Then the IP tries a different port (again 2 times). (all bots of course) How to sort strings in JavaScript I have a list of objects I wish to sort based on a field attr of type string. I tried using -  list.sort(function (a, b) {     return a.attr - b.attr })   but found that - doesn't appear to work with strings in JavaScript. How can I sort a list of objects based on an attribute with type string?