So far I managed to create a variable which stores the string and replaced blank with _ and : with @ title=$(youtube-dl --get-title https://www.youtube.com/watch?v=8b1JEDvenQU) echo  &quot;${title}&quot; echo  &quot;${title}&quot; | sed 's/ /_/g;s/:/@/g'   XGBoost Part 2: Classification XGBoost_Part_2@_Classification   I want to assign mod_title -&gt; ${title}&quot; | sed 's/ /_/g;s/:/@/g' and use this variable to use inside a function but I am not able to assign and print it. This is what I have tried: title=$(youtube-dl --get-title https://www.youtube.com/watch?v=8b1JEDvenQU) mod_title = &quot;${title}&quot; | sed 's/ /_/g;s/:/@/g' echo &quot;${mod_title}&quot;   error: b.sh: line 2: mod_title: command not found  I am new to bash scripting. So no idea how to do it.
I want to assign the result of an expression (i.e., the output from a command) to a variable and then manipulate it – for example, concatenate it with a string, then echo it.  Here's what I've got: #!/bin/bash cd ~/Desktop; thefile= ls -t -U | grep -m 1 &quot;Screen Shot&quot;; echo &quot;Most recent screenshot is: &quot;$thefile;  But that outputs: Screen Shot 2011-07-03 at 1.55.43 PM.png Most recent screenshot is:   So, it looks like that isn't getting assigned to $thefile, and is being printed as it's executed. What am I missing?
Is adding a time dummy the same as estimating by within-time fixed effects? What does var prime = num != 1; mean? Answers no longer sorted by score/votes Difference between >>> and >> Should we `enable` the User Systemd service `pulseaudio.service`? Our high-school teacher told us that the Earth pulls us with some force $F$ and we pull the Earth with the same force $F$. Within Newtonian physics this is true because of , but let’s consider . My mass is small; so I don’t warp space-time much. But Earth’s large mass warps space-time to a far greater extent.  So do I pull Earth with the same force it pulls me? If yes, how? PHP: How do I loop through every XML file in a directory? How to check if current thread is not main thread Using past tense when referencing a still-true fact In the sentence: "I didn't know she had a son,"   Can I say "I didn't know she has a son" instead, because he is a teenager now?  Or are both correct? Can I apply for a Schengen visa of the first port of entry or does it need to be the country of the longest duration? I'm planning to travel to the Netherlands, Spain and Bulgaria. My longest stay will probably be in Bulgaria. Now, Bulgaria doesn't issue a Schengen visa but allows people with a Schengen visa to visit. Which visa should I be applying for? Bulgarian Visa AND Schengen visa or just the Schengen visa for Netherlands or Spain? $\\$   A normal subgroup $N$ is a subgroup where the left cosets are the same as the right cosets. $N$ is normal $\iff $ $xnx^{-1} \in N,  \forall x\in G$.   5.) Why is it that if $[G:H]=2 \implies $ $H$ is normal subgroup?  6.) Can we say that a factor group is just a group that has left cosets of $N$ (being a normal subgroup) as its elements? So if $N$ is a normal subgroup, then the left cosets of $N$ forms a group under coset multiplication given by $aNbN = abN$.   7.) The group of left cosets of $N$ in $G$ is called the factor group, why do we denote this by $G/N$? These are the same things as the integers modulo $n$ groups? How can I relate those exactly? How to compute the determinant of a tridiagonal matrix with constant diagonals? How to show that the determinant of the following $(n\times n)$ matrix  $$\begin{pmatrix} 5 &amp; 2 &amp; 0 &amp; 0 &amp; 0 &amp; \cdots &amp; 0 \\ 2 &amp; 5 &amp; 2 &amp; 0 &amp; 0 &amp; \cdots &amp; 0 \\ 0 &amp; 2 &amp; 5 &amp; 2 &amp; 0 &amp; \cdots &amp; 0 \\ \vdots &amp; \vdots&amp; \vdots&amp; \vdots &amp; \vdots &amp; \vdots &amp; \vdots \\ 0 &amp; \cdots &amp; \cdots &amp; 0 &amp; 2 &amp; 5 &amp; 2 \\ 0 &amp; \cdots &amp; \cdots &amp; \cdots &amp; \cdots &amp; 2 &amp; 5 \end{pmatrix}$$  is equal to $\frac13(4^{n+1}-1)$?    More generally:     How does one compute the determinant of the following  (where the three diagonals are constant)?      $$M_n(a,b,c) = \begin{pmatrix} a &amp; b &amp; 0 &amp; 0 &amp; 0 &amp; \cdots &amp; 0 \\ c &amp; a &amp; b &amp; 0 &amp; 0 &amp; \cdots &amp; 0 \\ 0 &amp; c &amp; a &amp; b &amp; 0 &amp; \cdots &amp; 0 \\ \vdots &amp; \vdots&amp; \vdots&amp; \vdots &amp; \vdots&amp; \vdots &amp; \vdots \\ 0 &amp; \cdots &amp; \cdots &amp; 0 &amp; c &amp; a &amp; b \\ 0 &amp; \cdots &amp; \cdots &amp; \cdots &amp; \cdots &amp; c &amp; a \end{pmatrix}$$      Here $a,b,c$ can be taken to be real numbers, or complex numbers.   In other words, the matrix $M_n(a,b,c) = (m_{ij})_{1 \le i,j \le n}$ is such that $$m_{ij} = \begin{cases} a &amp; i = j, \\ b &amp; i = j - 1, \\ c &amp; i = j + 1, \\ 0 &amp; \text{otherwise.} \end{cases}$$  There does not seem to be an easy pattern to use induction: the matrix is not a diagonal  of the type $M = \bigl(\begin{smallmatrix} A &amp; C \\ 0 &amp; B \end{smallmatrix}\bigr)$ (where we could use $\det(M) = \det(A) \det(B)$ for the induction step), and there are no lines or columns with only one nonzero entry, so  gets complicated quickly.  Is there a general pattern that one could use? Or is the answer only known on a case-by-case basis? It's possible to compute the determinant by hand for small $n$:  $$\begin{align} \det(M_1(a,b,c)) &amp; = \begin{vmatrix} a \end{vmatrix} = a  \\ \det(M_2(a,b,c)) &amp; = \begin{vmatrix} a &amp; b \\ c &amp; a \end{vmatrix} = a^2 - bc \\ \det(M_3(a,b,c)) &amp; = \begin{vmatrix} a &amp; b &amp; 0 \\ c &amp; a &amp; b \\ 0 &amp; c &amp; a \end{vmatrix} = a^3 - 2abc \end{align}$$  But there is no readily apparent pattern and the computation becomes very difficult when $n$ gets large. Value of Vandermonde type determinant Let $x_1,...,x_n $ are distinct real numbers.  Is it a formula for the Vandermonde type determinant $V(x_1, \cdots,x_n)$  whose last column is $x_1^k,\ \cdots,\ x_n^k$, where $k \geq n$, instead of $x_1^{n-1},\ \cdots,\ x_n^{n-1}$?  Thanks Why isn't Force Speed used more often? Strange book where teen protagonist is sent to a warzone, uses illusory magic to grow male genitalia I'm currently going through notes on a physics course and I'm having trouble understanding the difference between a tensor, a vector, and a matrix. I know that a vector is a kind of tensor and that a matrix is also a form of tensor, but what I'm having trouble understanding is how they differ, and how a vector is related to a matrix. "He is loved", is 'loved' an adjective or a verb? He is loved.   This is something that I've always kind of wondered.  In a sentence like this, is loved a verb or an adjective? Can it be considered either? How does one prove that every finite group is isomorphic to a subgroup of an alternating group? How to customize Latexian to use other TeX engines or biber? The Mac editor Latexian has built in methods for compiling using latex+dvips, pdflatex and xelatex.  Furthermore, it assumes bibtex and makeindex to deal with bibliographies and indexes, respectively.  How do I customize Latexian to use, e.g. LuaTeX for compiling or Biber for bibliographies? I want to be able to have LinkedList.contains() return true for a custom comparator.  Suppose that I have 1 LinkedList and 2 objects  LinkedList&lt;MyObject&gt; myList = new LinkedList&lt;MyObject&gt;();  MyObject a = new MyObject("HELLO"); MyObject b = new MyObject("HELLO");   Technicaly, both objects are identical in terms of comparison (MyObject implements Comparable)   ( a == b ) == true  however, when I do the following, myList does not return true for myList.contains(b)  myList.add(a) myList.contains(b) // == false   I think its because contains will check object reference and see that a and b are 2 distinct objects. Is there any way I can make it so I don't have to extend LinkedList to compare those objects?