I have a directory of files with the following naming scheme:  &lt;project name&gt;-&lt;group name&gt;.txt   I want to extract &lt;group name&gt; from the files I am looping through:  #!/bin/sh  for f in *; do     echo "group name: ${f}" done   How can this be done? I am experimenting with ${f##...} and ${f%...} but without success so far. I am unsure if they can be combined, so I can first leave out the prefix &lt;project name&gt;- and then leave out the suffix .txt.
I have a filename in a format like:     system-source-yyyymmdd.dat   I'd like to be able to parse out the different bits of the filename using the "-" as a delimiter.
How to make horizontal lists? This might seem like a very simple question, but what is the easiest way to turn a normal vertical list into a horizontal one? How can I change directories in the terminal? I want to package my project in a single executable JAR for distribution.  How can I make a Maven project package all dependency JARs into my output JAR? Are the review queues planned for the iOS app? Why does turning Caps Lock off take such a long time to work? This is my biggest issue with Linux and the main reason I don't use it as my main working OS.  Whenever I use caps lock to write something in upper case and disable it in order to keep writing the next letter AFTER I've disabled it is written in upper case.  So, my text comes out weird, as SOMETHING *L*ike this  I've tried Linux Mint, Fedora ... and the issue keeps happening.  Searching Google I've found some very rare persons have the same issue, but I was unable to find any solution.  Is there any way to solve this or am I DOOMED *F*or life?  BTW, whenever I ask this question someone suggest I should learn to use shift, instead of caps lock. I know, that's the right way, but I'm used to use caps lock and, well, it should work. Is there an Extended Backus–Naur form (EBNF) that covers all of English? How to boot from non-Ubuntu live ISO images like Fedora or CentOS? SED: insert text after the last line? This  inserts a tag to the beginning of a file:  sed -i "1s/^/&lt;?php /" file   How can I insert something to the end of each file with sed? If $f: \mathbb Q\to \mathbb Q$ is a homomorphism, prove that $f(x)=0$ for all $x\in\mathbb Q$ or $f(x)=x$ for all $x$ in $\mathbb Q$.  I'm wondering if you can help me with this one? "In and of itself" is a phrase I find myself using all the time. But in and of itself, the phrase "in and of itself" has no meaning. That is, the individual words don't seem to contribute to the whole meaning of the phrase. If I simply wrap my query with:  BEGIN TRANSACTION    COMMIT TRANSACTION   If anything fails inside of that, will it automatically rollback?  From looking at other code, they seem to check for an error, if there is an error then they do a GOTO statement which then calls ROLLBACK TRANSACTION  But that seems like allot of work, to have to check for IF( @@ERROR &lt;> 0) after every insert/update. Deriving curvature formula How do you derive the formula for unsigned curvature of a curve $\gamma (t) = (x(t), y(t)$ which is not necessarily parameterised by arc-length.   The formula given is $$|\kappa (t)| = \left|\frac{x'' y' - y'' x'}{((x')^2 + (y')^2)^{3/2}}\right|$$  All the definitions of curvature in my notes give it in terms for an arc-length parameterisation $T'(s) = \kappa(s) N(s)$. This is apparently meant to be 'easily derivable', am I missing something? Is it possible to search for punctuation/special characters? I tried to find a related question here, but was unsuccessful.  Someone on SO asked ... I tried searching SO and was presented with the search options page. Even Google fails at this search.  So my question is, is there some way to search for an exact word (in quotes) that won't cause it to fail? Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date. Rasterizing a plot make axes ticks invisible Intuition for $\,c\mid a,b \iff c\mid \gcd(a,b)$ If $a^\phi = 1$ then the order of $a$ divides $\phi$ How do I rename all folders and files to lowercase on Linux? Let $\mathbf{FinVec}$ denote the category of finite-dimensional real vector spaces and linear maps, let $F\colon\mathbf{FinVec}\rightarrow\mathbf{FinVec}$ be a functor. For each pair of objects $V,W$, the Hom-set $\operatorname{Hom}(V,W)$ is itself a finite-dimensional vector space and we equip it with the unique structure of a topological space/of a smooth manifold that is compatible with its vector space structure. The composition maps are then continuous/smooth. In this way, we view $\mathbf{FinVec}$ as enriched over the category $\mathbf{Top}$/$\mathbf{Diff}$ respectively. It then makes sense to ask whether the functor $F$ is enriched over $\mathbf{Top}$/$\mathbf{Diff}$. That is just to ask whether the induced map $F\colon\operatorname{Hom}(V,W)\rightarrow\operatorname{Hom}(FV,FW)$ is continuous/smooth for all $V,W$. (Irrelevant to the rest of the question, but the reason this is a useful notion is that it is the natural hypothesis assuring that the functor induces another functor on the category of topological/smooth vector bundles, applying the original functor fiberwise.) In the case $V=W$, by functoriality, we can restrict $F$ to a group homomorphism $\operatorname{GL}(V)\rightarrow\operatorname{GL}(V)$. If the functor is continuous/smooth, so is this map. Note that $\operatorname{GL}(V)$ is a Lie group. It is a general result that a measurable group homomorphism between Lie groups is automatically smooth. This begs the following questions:  What's an argument for the existence of functors that aren't continuous? Can we construct one? Given the above, it either happens that the restrictions to $\operatorname{GL}(V)\rightarrow\operatorname{GL}(V)$ are continuous and continuity fails elsewhere, or the induced maps will be non-measurable, so that the construction will necessarily have to involve choice to some extent. Are there continuous functors that aren't smooth? Given the above, a continuous functor will have smooth restrictions to $\operatorname{GL}(V)\rightarrow\operatorname{GL}(V)$, but smoothness may fail elsewhere. Rendering smoke in Cycles?