You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "hongbin ma (JIRA)" <ji...@apache.org> on 2016/11/03 00:50:58 UTC

[jira] [Commented] (KYLIN-2155) get-properties.sh doesn't support parameters starting with hyphen

    [ https://issues.apache.org/jira/browse/KYLIN-2155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15631072#comment-15631072 ] 

hongbin ma commented on KYLIN-2155:
-----------------------------------

It seems the issue only occurs when the property value is "-n" or "-e", which happens to be options for the command "echo".
I did some tests:

[root@sandbox apache-kylin-1.5.4.1-bin]# a="-n"
[root@sandbox apache-kylin-1.5.4.1-bin]# echo $a
[root@sandbox apache-kylin-1.5.4.1-bin]# echo "$a"
[root@sandbox apache-kylin-1.5.4.1-bin]# b="-x"
[root@sandbox apache-kylin-1.5.4.1-bin]# echo $x

[root@sandbox apache-kylin-1.5.4.1-bin]# c="-w"
[root@sandbox apache-kylin-1.5.4.1-bin]# echo $c
-w


seem double quoting the variable will not help either.

if you change "-n" to "-n ", double quoting will work, is that what you expected?

> get-properties.sh doesn't support parameters starting with hyphen
> -----------------------------------------------------------------
>
>                 Key: KYLIN-2155
>                 URL: https://issues.apache.org/jira/browse/KYLIN-2155
>             Project: Kylin
>          Issue Type: Bug
>          Components: Tools, Build and Test
>    Affects Versions: Future, v1.6.1
>            Reporter: Ricardo Jorge de Sousa Teixeira
>            Assignee: hongbin ma
>         Attachments: fix.patch
>
>
> The last echo in get-properties.sh silently ignores strings with {{-n}}.
> It should be double quoted.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)