Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename variable name to uppercase NAME #83

Closed
wants to merge 7 commits into from
Closed

Rename variable name to uppercase NAME #83

wants to merge 7 commits into from

Conversation

radoondas
Copy link
Member

This is just a minor naming update of the script.
Is there any reason for variable 'name' to be lowercase?

This is just a minor naming update of the script.
In SHELL script usually all variables are uppercase. Is there any reason for variable name' to be lowercase?
@damm
Copy link

damm commented Feb 5, 2016

is there any reason to have name in uppercase either? assignment of variables is case sensitive in shells as well (typically).

$CURL -XPUT $ELASTICSEARCH/$KIBANA_INDEX/search/$name \
NAME=`basename $file .json`
echo "Loading search $NAME:"
$CURL -XPUT $ELASTICSEARCH/$KIBANA_INDEX/search/$NAME \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could be very careful here and make it ${NAME}

@radoondas
Copy link
Member Author

Well yes. On the other hand I would suggest not only ${NAME}, but more curly braces where variables are in the strings to be more safe and consistenst within the script. I will create PR later, with additions.

@ruflin
Copy link
Contributor

ruflin commented Feb 5, 2016

@radoondas Thanks

…to the script

This is more as a draft to be discussed. it will work for any beat if you configure it's mask in configfile.
Script doesn't touch original files, it creates tmp file instead.
Please, have a look and comment.
…ing to ES

This modification expect config file, where necessary renaming is defined.
This file can be empty or doesn't need to exist.
Script doesn't touch original files, it creates temp files instead.
This also works with other custom visualizations - just add your names and your set to go.
This solution requires further discussion.
@radoondas
Copy link
Member Author

For the reference, I have prepared another commit to my fork with curly braces in the script: 6e1948d

I have no PR so far. I believe, further discussion is required.

@radoondas
Copy link
Member Author

I believe, this one can be just closed. It is obsolete since #86 is now merged and #85 is in discussion.

@ruflin
Copy link
Contributor

ruflin commented Feb 10, 2016

Agree in closing this as changes are in #86 and #85

@ruflin ruflin closed this Feb 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants