[TxMt] Re: Strange issues with a shell script for a bundle command

Martin Kühl martin.kuehl at gmail.com
Wed Mar 9 20:36:33 UTC 2016


On 9 March 2016 at 21:31, feek <feekdiv at 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


More information about the textmate mailing list