0

Below bash script works as a bash script but if execute it in org-babel block as below, it report error:

sh: 2: Bad substitution

code:

#+begin_src sh :results output
str="toto.titi.12.tata.2.abc.def"
arr=${str//[!0-9]/ }
echo "${arr[@]}"
#+end_src
3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.