setting variable in a text file where the filename is a variable
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This is what i roughly try to do. I'm just echoing the $sql to test that the variable is set. What I want the script to do is run the next command
#run each sql in the folder
for file in ./tableau_views/*
do
sql = $(cat "$file")
echo $sql
#bq query --use_legacy_sql=false $sql
done
bash
New contributor
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
0
down vote
favorite
This is what i roughly try to do. I'm just echoing the $sql to test that the variable is set. What I want the script to do is run the next command
#run each sql in the folder
for file in ./tableau_views/*
do
sql = $(cat "$file")
echo $sql
#bq query --use_legacy_sql=false $sql
done
bash
New contributor
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
You have extra spaces around the=
in your assignment.
â Michael Homer
3 mins ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is what i roughly try to do. I'm just echoing the $sql to test that the variable is set. What I want the script to do is run the next command
#run each sql in the folder
for file in ./tableau_views/*
do
sql = $(cat "$file")
echo $sql
#bq query --use_legacy_sql=false $sql
done
bash
New contributor
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
This is what i roughly try to do. I'm just echoing the $sql to test that the variable is set. What I want the script to do is run the next command
#run each sql in the folder
for file in ./tableau_views/*
do
sql = $(cat "$file")
echo $sql
#bq query --use_legacy_sql=false $sql
done
bash
bash
New contributor
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 4 mins ago
![](https://lh4.googleusercontent.com/-TC0yE-vQ4hE/AAAAAAAAAAI/AAAAAAAAAAA/kjBupqlblV4/photo.jpg?sz=32)
![](https://lh4.googleusercontent.com/-TC0yE-vQ4hE/AAAAAAAAAAI/AAAAAAAAAAA/kjBupqlblV4/photo.jpg?sz=32)
Anthony Liu
1
1
New contributor
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Anthony Liu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
You have extra spaces around the=
in your assignment.
â Michael Homer
3 mins ago
add a comment |Â
You have extra spaces around the=
in your assignment.
â Michael Homer
3 mins ago
You have extra spaces around the
=
in your assignment.â Michael Homer
3 mins ago
You have extra spaces around the
=
in your assignment.â Michael Homer
3 mins ago
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Anthony Liu is a new contributor. Be nice, and check out our Code of Conduct.
Â
draft saved
draft discarded
Anthony Liu is a new contributor. Be nice, and check out our Code of Conduct.
Anthony Liu is a new contributor. Be nice, and check out our Code of Conduct.
Anthony Liu is a new contributor. Be nice, and check out our Code of Conduct.
Â
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479680%2fsetting-variable-in-a-text-file-where-the-filename-is-a-variable%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You have extra spaces around the
=
in your assignment.â Michael Homer
3 mins ago