How do I execute a command in each subdirectory? I'm using Puppet and I need to create symlinks between two folders. I have around 10 folders with the same structure and I always want to execute my link command in xx/yy/zz.  Something like this:  ln -s aa/bb/folder_to_link  folders_1_to_x/yy/link_name   I tried following  directions but had no success.  Is there an easy to write command that can accomplish this?
Run a command on all subfolders If you have a series of subfolders (like from a to z) and want to run a command on each one of them (like rm *.pdf or ls *.pdf), how do you do that? The "manual" approach would be cd a, rm *.pdf, or ls *.pdf, cd .., cd b, ... That seems too complicated, so I believe there must be an easier approach.
Asymptotic behavior of a trigonometric series Consider the following series $$S_N = \sum_{k=1}^N \frac{\sin[k\pi/(N+1)]}{k}.$$ What is the asymptotic behavior of this series for $N \to \infty$?  If we replace the sine function with the factor $1$, we get the standard harmonic series which diverges $\sim \ln N$. However, if we replace the sine function with $(-1)^k$, we get a convergent series with the result $\ln 2$. Therefore, I think that $S_N$, defined above, should diverge, but more slowly than the logarithm. Am I correct? Subfields of finite fields We know that if a finite field $F$ has characteristic $p$ (prime), then $F$ has cardinality $p^r$ where $r = [F:\mathbb{F}_p]$.   I'm now trying to say something about the possible cardinalities of subfields of $F$. I can see that there is a subfield of cardinality $p^s$ for each $s$ that divides $r$, given by the fixed field of the group generated by $\phi^s$, where $\phi$ is the Frobenius automorphism.  Now suppose $K$ is a subfield of $F$. Then (since both are additive groups), Lagrange gives us that $|K|$ divides $|F|$, so $|K| = p^t$ for some $1 \leq t \leq r $ (alternatively, $K$ contains $\mathbb{F}_p$ and so is a vector space over $\mathbb{F}_p$ and is thus isomorphic to $\mathbb{F}_p^t$, where $t = [K:\mathbb{F}_p]$). By considering the multiplicative group of units of $K$ and $F$ respectively, we get that $ p^t - 1$ divides $p^r -1$. I want to make the leap to $t|r$, but I'm failing to see why this needs to be true. Any help would be appreciated. Interpolation of multibeam bathymetry using ArcGIS Desktop? I'm trying to make a 3D map with multi-beam bathymetry (65536 features, xyz), but it seems that the interpolation methods are too rigid. I need to smooth the data so it looks more natural and realistic.   Which parameters do I have to vary so I can get this? Generating random numbers without repetitions The  from Goblin Punch states the following:     Hungry Coffin   HD 6 AC 14 Slam 2d6 or 2d8 Swallow 1d6 + swallow   Fly 9 Int 5 Morale 12   It says the Hungry Coffin has "HD 6". This doesn't help me at all, because I still don't know what its average HP is, or how to roll its HP. How do I figure this out? Thanks! Can 'home' be an adjective as well as an adverb or a noun? All the dictionaries I've consulted say that 'home' is an adverb and a noun, depending on context. For example:  (1) He went home. [adverb] (2) He is at home. [noun]  Also, there's  that seemingly resolves the issue of why 'home' sometimes should be analyzed as an adverb. But what about this example?  (3) I can find my way home.  Can you also say that home in (3) is an adverb? It seems to me that home in (3) cannot be an adverb, because I think it functions as a complement of the noun way and that my way home as a whole is a noun phrase. Even if we accept John Lawler's analysis in the above quoted answer of considering home &quot;one of those idiomatic locative nouns that are allowed to drop determiners and occasionally even prepositions,&quot; we cannot say home in (3) is an example of &quot;how a noun can be used as an adverb&quot;, because (3) can be analyzed as John Lawler suggests:  (3') I can find my way (to my) home.  Here, to my home is not an adverbial prepositional phrase but an adjectival prepositional phrase that acts as a complement of the noun way. So, to take what John Lawler said and adapt it to (3), &quot;what it is is an [adjectival] prepositional phrase that has been stripped of its prepositions and determiners, leaving only a naked noun to stand for the whole phrase. That's how a noun can be used as an [adjective].&quot; Now, does this mean we should call home a noun, an adverb, or an adjective, depending on context? How to send data to a serial port and see any answer? On Linux, I want to send a command string (i.e. some data) to a serial port (containing control characters), and listen to the response (which also usually might contain control characters).   How can I do this as simplest as possible on Linux? An example is appreciated! Hello native English speakers!  I want to ask you about either and both. I tried to find similar questions in this site but I think they were not same with these ones.  My questions are;   I was invited to two parties, but I couldn't go to ------- of them.  I took two books with me on holidays, but I didn't read ------- of     them.   I choose both for questions 1 and 2. But the right answers were either. But I think both and either are correct either. Am I right?   Thank you in advance! How to make crs transformation of a QgsVectorLayer? I need to transform QgsVectorLayers in python from one crs into another crs. By googling I found the following solution (), which works for points only:  crsSrc = QgsCoordinateReferenceSystem(4326)    # WGS 84 crsDest = QgsCoordinateReferenceSystem(32633)  # WGS 84 / UTM zone 33N xform = QgsCoordinateTransform(crsSrc, crsDest) pt1 = xform.transform(QgsPoint(18,5))   Is there a way to make a crs transformation of an entire layer? Verify mysqldump backup is corruption free Let $m,n$ be positive integers bigger than $1$. Show that $\mathbb{Z}_m \times \mathbb Z_n$ is cyclic if and only if $\gcd(m,n)=1$.    I have no idea on how to start. Anyone hints are much helpful. biblatex - issue number of journal in date Should questions where a problem arose from a typo be closed? Should questions where a problem arose from a typo be closed?  Here is a recent example:    The problem was a misspelled _gaq (written as _gat).   Should these be closed? Surely they're of no use to anyone once the OP recognizes the mistake. If so, what justification should be given? Not a real question? Too localized?     Just to be clear, the question linked above actually was not broken due to a typo. This was my mistake, and raises some other interesting questions. See the discussion below.  If anyone feels like editing this question with examples of actual typo questions, go for it. From the TV Show Krypton, Dru-Zod is the son of Seg-El and Lyta-Zod. In S02E05 'A better yesterday', Lyta-Zod's throat gets slit by Jax-Ur leading to Lyta's death. How is Dru-Zod still alive? Shouldn't he be wiped from existence? Proper way to Plot a single function in two different styles? How do I correct an HSA distribution when I was refunded by a health provider? As far as I see the "Blatantly off-topic" flag      Blatantly off-topic (this question has nothing to do with %site topic%)    is only available for low-rep users without the close vote privilege.  What is the reason to remove this option for high-rep users? I think it could be very usefull in some cases where now we must select      Other (add a comment explaining what is wrong)    option and waste time to type obvious message for a reason. Please require more reviewers on First Posts On the one hand, I see very few posts in the review queue when I visit.  On the other hand, I see a lot of pretty awful first posts sitting on the front page.  This leads me to suspect that robo-reviewers are blowing through the queue.  Given how empty the queue is, could you please increase the number of people who have to check in before a post leaves the queue?  Of course, some honey-pot solution to detect and disable the auto-clickers would be even better. How to eliminate Cycles artifacts with many overlapping volumes? I have encountered an issue with Cycles Volumetrics in a recent scene. I am using Blender 2.72, and both CPU and GPU render options. In both I get a solid black artifact when I have two volumes overlapping, as in this campfire smoke test:    I have a solid cube, with a volume scatter and volume absorption material, duplicated by a particle system. As you can see, when the particles get higher up and farther apart, and are no longer overlapping, the artifacts disappear. Why doesn't "cd" work in a shell script? I just want to write a script which changes my directory.  I put the below commands in the file /home/alex/pathABC  #!/bin/sh cd /home/alex/Documents/A/B/C echo HelloWorld   I did   chmod +x pathABC   In the Terminal, while in /home/alex, I ran ./pathABC, but the output is just HelloWorld and the current directory is not changed.  So what is wrong?