WdlParser$SyntaxError on a awk command

I got the WdlParser$SyntaxError when running the command awk '/^S/{print ">"$2; print $3}' tmp/hifiasm/asm.bp.r_utg.gfa > tmp/hifiasm/generated_asm.bp.r_utg.fa in a WDL file. Do you know what’s wrong with my WDL file? Is there a workaround for that? I suspected I need to escape special characters in the WDL file. I checked the WDL 1.0 specification document. But I couldn’t find it.

Here is my environment.

$ cat /etc/fedora-release 
Fedora release 36 (Thirty Six)

$ java --version
openjdk 17.0.4.1 2022-08-12
OpenJDK Runtime Environment (Red_Hat-17.0.4.1.1-1.fc36) (build 17.0.4.1+1)
OpenJDK 64-Bit Server VM (Red_Hat-17.0.4.1.1-1.fc36) (build 17.0.4.1+1, mixed mode, sharing)

$ dockstore --version
Dockstore version 1.13.0-rc.0
The latest stable version is 1.12.0
You are currently on the latest unstable version. If you wish to upgrade to the latest stable version, please use the following command:
   dockstore --upgrade-stable

Here is the log and the error message.

$ make run-assembly
dockstore tool launch \
	--local-entry "assembly.wdl" \
	--json "assembly.inputs.json"
Created temporary working directory at '/tmp/1662973634619-0'
Using local file 'assembly.wdl' as primary descriptor
11:07:14.906 [main] ERROR io.dockstore.client.cli.ArgumentUtility - Problem parsing WDL file: Unrecognized token on line 24, column 38:

    awk '/^S/{print ">"$2; print $3}' tmp/hifiasm/asm.bp.r_utg.gfa \
                                     ^
11:07:14.908 [main] ERROR io.dockstore.client.cli.ArgumentUtility - wdl.draft3.parser.WdlParser$SyntaxError: Unrecognized token on line 24, column 38:

    awk '/^S/{print ">"$2; print $3}' tmp/hifiasm/asm.bp.r_utg.gfa \
                                     ^
	at io.dockstore.common.WdlBridge.getBundleFromContent(WdlBridge.scala:383)
	at io.dockstore.common.WdlBridge.getBundle(WdlBridge.scala:359)
	at io.dockstore.common.WdlBridge.getInputFiles(WdlBridge.scala:142)
	at io.dockstore.common.WdlBridge.getInputFiles(WdlBridge.scala:158)
	at io.github.collaboratory.wdl.WDLClient.getInputFiles(WDLClient.java:99)
	at io.github.collaboratory.wdl.WDLClient.provisionInputFiles(WDLClient.java:109)
	at io.dockstore.client.cli.nested.BaseLanguageClient.launchPipeline(BaseLanguageClient.java:176)
	at io.github.collaboratory.wdl.WDLClient.launch(WDLClient.java:72)
	at io.dockstore.client.cli.nested.AbstractEntryClient.launchWdl(AbstractEntryClient.java:1470)
	at io.dockstore.client.cli.nested.AbstractEntryClient.checkEntryFile(AbstractEntryClient.java:913)
	at io.dockstore.client.cli.nested.AbstractEntryClient.launch(AbstractEntryClient.java:1378)
	at io.dockstore.client.cli.nested.AbstractEntryClient.processEntryCommands(AbstractEntryClient.java:312)
	at io.dockstore.client.cli.Client.run(Client.java:737)
	at io.dockstore.client.cli.Client.main(Client.java:633)

make: *** [Makefile:42: run-assembly] Error 6

Here is the part of the WDL file.

task hifiasm {
  ...
  command {
    ...
    awk '/^S/{print ">"$2; print $3}' tmp/hifiasm/asm.bp.r_utg.gfa \
        > tmp/hifiasm/generated_asm.bp.r_utg.fa
    ...
  }
  ...
}

I found the minimal reproducer. The command echo '{}' causes the error.

task hifiasm {
...
  command {
...
    echo '{}'
...
  }
}
$ make run-assembly
dockstore tool launch \
	--local-entry "assembly.wdl" \
	--json "assembly.inputs.json"
Created temporary working directory at '/tmp/1662975760462-0'
Using local file 'assembly.wdl' as primary descriptor
11:42:40.753 [main] ERROR io.dockstore.client.cli.ArgumentUtility - Problem parsing WDL file: Unrecognized token on line 24, column 14:

    echo '{}'
             ^
11:42:40.756 [main] ERROR io.dockstore.client.cli.ArgumentUtility - wdl.draft3.parser.WdlParser$SyntaxError: Unrecognized token on line 24, column 14:

    echo '{}'
             ^
	at io.dockstore.common.WdlBridge.getBundleFromContent(WdlBridge.scala:383)
	at io.dockstore.common.WdlBridge.getBundle(WdlBridge.scala:359)
	at io.dockstore.common.WdlBridge.getInputFiles(WdlBridge.scala:142)
	at io.dockstore.common.WdlBridge.getInputFiles(WdlBridge.scala:158)
	at io.github.collaboratory.wdl.WDLClient.getInputFiles(WDLClient.java:99)
	at io.github.collaboratory.wdl.WDLClient.provisionInputFiles(WDLClient.java:109)
	at io.dockstore.client.cli.nested.BaseLanguageClient.launchPipeline(BaseLanguageClient.java:176)
	at io.github.collaboratory.wdl.WDLClient.launch(WDLClient.java:72)
	at io.dockstore.client.cli.nested.AbstractEntryClient.launchWdl(AbstractEntryClient.java:1470)
	at io.dockstore.client.cli.nested.AbstractEntryClient.checkEntryFile(AbstractEntryClient.java:913)
	at io.dockstore.client.cli.nested.AbstractEntryClient.launch(AbstractEntryClient.java:1378)
	at io.dockstore.client.cli.nested.AbstractEntryClient.processEntryCommands(AbstractEntryClient.java:312)
	at io.dockstore.client.cli.Client.run(Client.java:737)
	at io.dockstore.client.cli.Client.main(Client.java:633)

make: *** [Makefile:42: run-assembly] Error 6

OK. It seems that the code below is a workaround.

task hifiasm {
  input {
    String awk_prog = "{}"
  }
  command {
...
    echo "${awk_prog}"
...
  }
...
}