On 9 March 2016 at 21:31, feek feekdiv@gmail.com wrote:
#!/bin/bash [[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] && . "${TM_SUPPORT_PATH}/lib/bash_init.sh" cd ~/Desktop contenttitle=`grep -m 1 '^#{1}' test.md` echo $contenttitle
Try adding quotes to the last two lines:
contenttitle="`grep -m 1 …`" echo "$contenttitle"
The last line is subject to filename generation, the second to last may be as well.
HTH, Martin