I'm trying to set up an sh script that will run every 30 minutes. During each run, I want to check a directory for the presence of at least one .RAW file. Upon finding that file extension, I will have other code to execute, but right now I'm having trouble figuring out the correct if statement to use.  I know this code example isn't the most ideal way to do it, but here's the code I tried which is obviously wrong:  cd ./dir/ if [ ! -f "*.RAW"]; then   echo "No files!" else   echo "Yes files!" fi   How can I correctly test for the presence of the .RAW extension?
I am trying to write an if statement to test whether there are any files matching a certain pattern. If there is a text file in a directory it should run a given script.  My code currently:  if [ -f /*.txt ]; then ./script fi   Please give some ideas; I only want to run the script if there is a .txt in the directory.
What is it used for and why  doesn't it equal $\log{x^2}$? I have a select control, and in a javascript variable I have a text string.  Using jQuery I want to set the selected element of the select control to be the item with the text description I have (as opposed to the value, which I don't have).  I know setting it by value is pretty trivial. e.g.  $("#my-select").val(myVal);   But I'm a bit stumped on doing it via the text description. I guess there must be a way of getting the value out from the text description, but my brain is too Friday afternoon-ed to be able to work it out. Recently I'm working on a project aiming to convert the vibration of sound waves into electricity to charge batteries using a piezoelectric material (MFC type). I was trying to use the human voice as an input, but theoretically it was not enough, so do you have any ideas about some places that I can apply my project on it (that must be noisy or can give me vibrations)?  Moreover, has the MFC material been used before in this application? If I used many pieces of it in parallel would that help? How long do you get to use a UK standard visitor visa from time of issue or is it valid for entry indefinite I am going to apply for a standard visitor visa for my girlfriend to enter UK. If it is issued how soon does it have to be used after issue, ie. validity until time of entry? Need to reset the value of sequence in Oracle Are there any cheap, fast lenses capable of highschool sports photography? I recently took on my first paying client, and she is also into photgraphy. She usually does sports for her highschool yearbook. They just have an entry level Canon DSLR with a kit zoom on it that goes up to 200mm, but it's not very fast (f/4 or 5.6 or so). She told me that she has a tough time - especially at basketball games - getting shots with any kind of reasonable lighting, and has to do a lot of work in post just to get them reasonable.   mentions the Cannon EF 300mm f/2.8L IS USM II for professional sports photographers. At $6k USD I suspect the yearbook won't be springing for that lens anytime soon.  So I was curious, are there any reasonable quality, fast lenses for Canon cameras that are lower priced (certainly no more than say, $1k)? I'd love to be able to point them to a couple of options. I assume the largest print they'd be making would be a full spread in the yearbook - maybe two 17"x11" (two 8.5" side by side) Prove that $x^2 + y^2 = z^4$ has infinitely many solutions with $(x,y,z)=1$.   Do I use the terms $x= r^2 - s^2$, $y = 2rs$, and $z = r^2 + s^2$ to prove this problem?  Thanks for any help. Exists a dedicated non-O(n²) Algorithm for avoiding to have overlapping elements? I am generating positions in a random fashion.  In the game world, instantiated elements have a radius, and shouldn't overlap.  The problem is that they will overlap because I use a usual random number generator combined with other fanciness. I can't use other random number generation algorithms where I can guarantee that the elements will never overlap.  A way to solve this is to use a spatial data structure and search for the nearest neighbors in that tree. When I insert an element into that tree, I update it accordingly.  This solution would do the work and it would be fast but my question is:  Is there a dedicated algorithm without that Tree implementation complexity which is faster than O(n²)? Is it possible to assign the same value to multiple keys in a dict object at once? What are the strengths and weaknesses of each follower? What is $n!$ when $n=0$? Syntax to add multiple commands to a single command block I am looking to try and set multiple commands in a single command block, but so far everything I have tried just returns "Unknown Command".  What is the format for writing multiple commands in a single command block in Minecraft 1.8?  Can I use either of the following:  Command:(command here) Command:(command here)     /command here; /command here;   Or is there another format? $\mathbb{Q}(\sqrt{p},\sqrt[3]{q})=\mathbb{Q}(\sqrt{p}\sqrt[3]{q})$ for distinct prime $p,q$ Make Firefox save new bookmarks in the Bookmarks Menu (not Other Bookmarks) Recently, Firefox has changed the default folder for newly created bookmarks (using Ctrl+D) from the Bookmarks Menu to "Other Bookmarks".  Is there some way to change that back? Or some alternate method instead of Ctrl+D?  EDIT  A native way to do this (without an add-on) would be best. How to split the output and store it in an array? This is the output:  3,aac-lc, 93.8, aaclc, 77.3, h.264, 1024.6, h.264, 1029.1, 31, 31, 0,0,0.000000,31,31,0,0,0.000000,7,0,0,0.000000,30,1280 720,10,0,0,0.000000,30,1280 720   I tried with 2 scenario:   Storing in an array    @arr=split(',',$stats);   echo "statistics: $stats"  Storing in a variable   echo $stats | cut -d ',' -f | read s1  echo $s1    But neither scenario is working. What did Hisoka do in the Hunter Exam? In the first Hunter Exam of the series (Hisoka's second),  was introduced into the series removing another applicant's arms from his body for bumping into him and not apologizing.    What did he actually do? We know Hisoka's abilities are Bungee Gum and Texture Surprise, but they don't explain how the arms are converting into flower petals as seen above. I am wanting to find a latitude and longitude point given a bearing, a distance, and a starting latitude and longitude.  This appears to be the opposite of this question ().  I have already looked into the haversine formula and think it's approximation of the world is probably close enough.  I am assuming that I need to solve the haversine formula for my unknown lat/long, is this correct? Are there any good websites that talk about this sort of thing? It seems like it would be common, but my googling has only turned up questions similar to the one above.  What I am really looking for is just a formula for this. I'd like to give it a starting lat/lng, a bearing, and a distance (miles or kilometers) and I would like to get out of it a lat/lng pair that represent where one would have ended up had they traveled along that route. dimensional analysis of the Shannon-Hartley theorem In the infamous  the bandwidth of the channel is measured in Hz (Hertz) but the channel capacity is measured in bps (bits per second). So, either I'm missing something obvious or there's a dimensional mismatch in the equation.. Can somebody please help me understand? Regexp that matches valid regexps Proper subspaces of $ R^n $ I'm trying to prove that proper subspaces of $ R^n $ are closed and have empty interiors.  To prove that they are closed I'm trying to use the fact that inverse images of closed sets are closed sets by continuous functions. So I'm trying to find a linear map such that a proper subspace of $ R^n $ is its Kernel but I don't know how to express it so that it would work on all dimensions.  Regarding the fact that they have empty interiors, I really don't know what to do.  Thanks in advance.