I'm aware I can use awk to parse on multiple delims, but that spawns subprocesses. I wanted to know if compound/nested bash parameter expansion is possible.  I have PDFs in a directory named like "Px_MM-DD-YY_SSSSSSSSSS.pdf" where:   "Px" means "Page x", and x has no leading zeroes. "MM" corresponds to the two digit month, with a leading zero if applicable. "DD" corresponds to the two digit day, with a leading zero if applicable. "YY" corresponds to the two digit year, with a leading zero if applicable. "SSSSSSSSSS" corresponds to the ten digit epoch time the PDF was created, which allows me to keep PDF page revisions.   I have a for loop (I'll drop "-mtime" when I'm ready to operate on all the PDFs)  for file in $(find -type f -iname '*_??????????.pdf' -mtime -1) do     echo $file done   where I want to echo only the epoch time.   I can use this for loop   for file in $(find -type f -iname '*_??????????.pdf' -mtime -1) do     echo ${file##*_} done   and for the file named like "./P14_07-21-18_4X_1532144458.pdf", "1532144458.pdf" is echoed to the screen.  I can use this for loop   for file in $(find -type f -iname '*_??????????.pdf' -mtime -1) do     echo ${file%.*} done   and for the file named like "./P14_07-21-18_4X_1532144458.pdf", "./P14_07-21-18_4X_1532144458" is echoed to the screen.  If I replace the echo ... line with any of the formats below  echo ${${file##*_}:0:10} echo ${(${file##*_}):0:10} echo ${${file##*_}%.*} echo ${{file%.*}##_} echo ${${file%.*}##_}   I get -bash: ... : bad substitution. Am I not getting the syntax right or is nested/compound bash expansion not possible?
I'm trying to use the Bash parameter expansions to modify the output of a command substitution or another parameter expansion. The following nested expansions work quite well in Zsh; but result in a &quot;bad substitution&quot; error in Bash: ${${PWD##*/}//trunk/latest}  or ${$(basename $PWD)//trunk/latest}  the output should be the last folder of the $PWD, replaced by latest when my current directory is trunk so /home/user/trunk should become latest Is there a Bash equivalent allowing to chain expansions without relying on variables or pipes? Or do Bash expansions only allows the input to be a string or a plain variable?
An easy bash completion tutorial? Well, this is an exercise problem from Herstein which sounds difficult:   How does one prove that if $|G|&gt;2$, then $G$ has non-trivial automorphism?   The only thing I know which connects a group with its automorphism is the theorem, $$G/Z(G) \cong \mathcal{I}(G)$$ where $\mathcal{I}(G)$ denotes the Inner- Automorphism group of $G$. So for a group with $Z(G)=(e)$, we can conclude that it has a non-trivial automorphism, but what about groups with center? I'd like to output hello world over 20 characters.  printf "%-20s :\n\n" 'hello world!!'  # Actual output hello world!!        :  # Wanted output hello world!!========:   However, I don't want to complete with spaces but with "=" instead. How do I do that? Incorrect plot using pgfplots (trigonometric functions like cos, sin and tan) Degree of the extension $\mathbb{Q}(\sqrt{a+\sqrt{b}})$ over $\mathbb{Q}$ Following my  the book then asks      Use this to determine when the field extension  $\mathbb{Q}(\sqrt{a+\sqrt{b}})$ over $\mathbb{Q}$  is biquadratic (where $a,b\in\mathbb{Q}$)   "this" means what proved in the linked post.  My thoughts: First, I don't know what to say when $a^2-b$ is not a square. When $a^2-b$ is a square I think that the extension is of degree $2$ if $a=b$, this leaves the case $a\neq b$ which I am also having problems with and I don't know what to do (I have some cases like if $m,n$ are different primes then the degree of the extension is $4$, but I don't have something that is general)  Can someone please help my do this exercice  ? What is the symbol on the supply voltage that looks like a shaded-in capacitor? I am looking at  (dual low-voltage power amplifier). On the fourth page, there is a sample circuit; right at the V+ input there is a symbol that looks like a capacitor. However, it looks like it is shaded in. What is that? Was Stack Exchange named after Experts Exchange? Was Stack Exchange named after Experts Exchange, or is the former using the word "Exchange" a coincidence? Is it possible to create an iron door which responds to levers on both sides Where do I find out how a command/environment is defined? Say I want to redefine the itemize environment, or make a modified version of it. I want to know how it is currently defined. Where do I find this information? If it's some particular package command, I can just look at the .sty file for that package, but if it's something more basic, I don't know where to look...  Is there a reference manual of where all this stuff is explained? Or is there a file in the depths of my texmf tree I should poke around in? I'd like to know how many downloads of a given package in a PPA there have been since it was first published.  I remember there was  about it about getting these metrics on the web UI, but as far as I know, it never got implemented.  But I think the number of downloads can nevertheless be obtained via the  if I'm the owner of that PPA. Any pointers? I unintentionally and stupidly wiped my Clash of Clans game data. I went to Application Manager on my Android and clicked 'Clear data'. (I used this for fixes before and it never started a new game.)   Now, my level 60 or so base has been wiped as if was to start a new game. Have I doomed myself to starting again or is there a way in which I can retrieve my old game save? Maybe by contacting Supercell? I have a snapshot of my base. "Pupil" or "Student", what is the correct use? How to batch import Wavefront OBJ files? Is it possible to batch import Wavefront .obj to blender? I'm working on 2.69. If I select multiple .obj files, only one gets imported. Also if I hit A on file selection window to select all files (.obj and .mtl) I get an error, nothing gets imported. I have to import several hundreds of .obj into the blender file, is this possible? Batch files: How to read a file? Some of the Puella Magi seem to have magical powers related to the wishes that they made. Sayaka has regeneration abilities, and she wished to heal someone. Homura has time manipulation abilities, and she wished to go back in time.  But other magical girls, like Mami and Kyouko, don't appear to have powers related to their respective wishes.  So, is there a connection, or is it only a coincidence for Sayaka and Homura? If it's the former, how do Mami and Kouko's wishes relate to their powers? When certain nationalities of people want to travel in the Schengen zone, they are required to apply for a Schengen visa. This is a straight-forward process for most, but when an applicant has had problems with removals or refusals they may be reluctant to apply because they want to avoid the complexities of serial visa refusals. This reluctance may lead some into wondering how their history can be expunged, and this line of thought inevitably leads to the idea of getting their passport replaced with a new one.  This sounds like a great formula for people who have had prior refusals or removals.  In essence they can become 'reincarnated' as a first-time traveller and hence avoid the unpleasantness of revealing their prior interactions with the Schengen authorities.  The relevant parts of the application form are shown here...    Nothing asks about a prior removal or refusal, and the applicant is left with simple denials for 3 questions in order to present themselves as a first-time traveller.  Assuming the person is happy to set aside the moral issues associated with denying their history, are there any holes to this strategy?  This question is scoped to Schengen visa applications so that it will not be unmanageably broad, but answers from other regimes (particularly the affluent Commonwealth and the USA) are acceptable as long as the main points are relatively consistent with Schengen. Comparisons: "so [adjective/adverb] as" or "as [adjective/adverb] as" How to calculate Network Service Areas in QGIS? Is "forte" pronounced "fort" or "for-tay"? I've always heard people say something like     "Pronunciation is not my [for-tay]"   ... but I feel that I've heard that the correct pronunciation is     "Confusing people is my [fort]"   What is the proper way to pronounce this word? How can i find the python triggered by the GUI? I want to fully automatize some of my blender processes, an i run into a lot of problems not finding the correct commands, not using the correct args...  Can i just "see" in a log somewhere what were the commands blender ran ?  To be very precise, i want to load a gltf file, and export it to stl.  No problem through the gui, but i'm stuck with that bit of code :   import bpy import sys import os  file = open(r"C:\Users\theo1\Documents\GitHub\Hackathon2020\map&amp;mapdata\mini.gltf")  bpy.ops.import_scene.gltf(file) bpy.ops.export_mesh.stl(filePath=r"C:\Users\theo1\Documents\GitHub\Hackathon2020\map&amp;mapdata\mini.stl")   Which gives me this :   Traceback (most recent call last):   File "&lt;string&gt;", line 1, in &lt;module&gt;   File "C:\Users\theo1\Desktop\impExp.py", line 7, in &lt;module&gt;     bpy.ops.import_scene.gltf(file)   File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 198, in __call__     C_dict, C_exec, C_undo = BPyOpsSubModOp._parse_args(args)   File "C:\Program Files\Blender Foundation\Blender 2.81\2.81\scripts\modules\bpy\ops.py", line 151, in _parse_args     raise ValueError("1-3 args execution context is supported") ValueError: 1-3 args execution context is supported   thanks.