{"action":"closed","issue":{"url":"https://api.github.com/repos/nextflow-io/nextflow/issues/157","repository_url":"https://api.github.com/repos/nextflow-io/nextflow","labels_url":"https://api.github.com/repos/nextflow-io/nextflow/issues/157/labels{/name}","comments_url":"https://api.github.com/repos/nextflow-io/nextflow/issues/157/comments","events_url":"https://api.github.com/repos/nextflow-io/nextflow/issues/157/events","html_url":"https://github.com/nextflow-io/nextflow/issues/157","id":155247038,"number":157,"title":"Nextflow confused by dollar-styled variables in awk code","user":{"login":"jgrzebyta","id":6738268,"avatar_url":"https://avatars.githubusercontent.com/u/6738268?v=3","gravatar_id":"","url":"https://api.github.com/users/jgrzebyta","html_url":"https://github.com/jgrzebyta","followers_url":"https://api.github.com/users/jgrzebyta/followers","following_url":"https://api.github.com/users/jgrzebyta/following{/other_user}","gists_url":"https://api.github.com/users/jgrzebyta/gists{/gist_id}","starred_url":"https://api.github.com/users/jgrzebyta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgrzebyta/subscriptions","organizations_url":"https://api.github.com/users/jgrzebyta/orgs","repos_url":"https://api.github.com/users/jgrzebyta/repos","events_url":"https://api.github.com/users/jgrzebyta/events{/privacy}","received_events_url":"https://api.github.com/users/jgrzebyta/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nextflow-io/nextflow/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-17T12:28:17Z","updated_at":"2016-05-17T13:07:43Z","closed_at":"2016-05-17T13:07:43Z","body":"I need to write a work flow with strong _awk_ support. Sometimes it is not to worth to create a separate script for that. but it seems nextflow and deeper groovy is confused with all awk's dollar-styled variables such as $1, $1, etc. I have error: \r\n\r\n> N E X T F L O W  ~  version 0.18.3\r\n>\r\n> Launching debug.nf\r\n> ERROR ~ startup failed:\r\n> _nf_script_b95fdd1c: 6: illegal string body character after dollar sign;\r\n>    solution: either escape a literal dollar sign \"\\$5\" or bracket the value expression \"${5}\" @ line 6, column 37.\r\n>    file 'yeastract_data' into yeast_out\r\n\r\n\r\nI use: \r\njava -version:\r\n> openjdk version \"1.8.0_91\"\r\n> OpenJDK Runtime Environment (build 1.8.0_91-8u91-b14-0ubuntu4~16.04.1-b14)\r\n\r\nlsb_release -a:\r\n> Distributor ID:\tUbuntu\r\n> Description:\tUbuntu 16.04 LTS\r\n\r\nMy example file is:\r\n```\r\n#!/usr/bin/env nextflow\r\n\r\nprocess import_yeastract {\r\n\r\noutput:\r\nfile 'yeastract_data' into yeast_out\r\n\r\n\"\"\"\r\ncurl -s -L http://www.yeastract.com/download/TFConsensusList_20130918.transfac.gz \\\r\n| gunzip -c \\\r\n| gawk 'BEGIN{FS=\"[ ]+\"}{ if($0~/^NA/) print $2}' \\\r\n|sort \\\r\n| uniq >yeastract_data\r\n\"\"\"\r\n\r\n}\r\n\r\nyeast_out.subscribe { println \"final file: \" + it}\r\n\r\n```\r\n"}}