-
Notifications
You must be signed in to change notification settings - Fork 72
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
Conversation
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?
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 \ |
There was a problem hiding this comment.
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}
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. |
@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.
…ces' in to the script" This reverts commit 38f60b0.
…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.
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. |
This is just a minor naming update of the script.
Is there any reason for variable 'name' to be lowercase?