bash script ask for an amount and then ask that many prompts
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I am getting confused here how to do this. Say I want to make a script that asks how many tracks in a cd and then asks for the track name that many times with each track formatted and exported to a file. I tried this so far but its wrong.
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
#while not amount of tracks
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
#indirection not a good idea?
#http://mywiki.wooledge.org/BashFAQ/006#Indirection
#ask for track<count> title save to variable TTITLE
read -p 'Track '$(($TRACK + 1))': ' TTITLE
TTITLE="$TTITLE:-No Name"
set TTITLE$TRACK=TTITLE
echo $!TTITLE$TRACK
(( TRACK++ ))
done
What I expect to get is a file such as:
TTITLE1=Uptown Funk!
TTITLE2=Thinking Out Loud
TTITLE3=See You Again
what i get is line 14: $!TTITLE$TRACK: bad substitution
and set | grep TITLE
returns nothing so no variable is being set (I think).
bash shell-script variable
add a comment |Â
up vote
0
down vote
favorite
I am getting confused here how to do this. Say I want to make a script that asks how many tracks in a cd and then asks for the track name that many times with each track formatted and exported to a file. I tried this so far but its wrong.
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
#while not amount of tracks
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
#indirection not a good idea?
#http://mywiki.wooledge.org/BashFAQ/006#Indirection
#ask for track<count> title save to variable TTITLE
read -p 'Track '$(($TRACK + 1))': ' TTITLE
TTITLE="$TTITLE:-No Name"
set TTITLE$TRACK=TTITLE
echo $!TTITLE$TRACK
(( TRACK++ ))
done
What I expect to get is a file such as:
TTITLE1=Uptown Funk!
TTITLE2=Thinking Out Loud
TTITLE3=See You Again
what i get is line 14: $!TTITLE$TRACK: bad substitution
and set | grep TITLE
returns nothing so no variable is being set (I think).
bash shell-script variable
I just found stackoverflow.com/a/35592555/4200976 that says to use bash arrays. I will try to see if that works.
â FoxSam12
Apr 18 at 16:15
The original question as posted was unclear. I ultimately needed this list as a seperate file anyway so I dont need to have a bunch of variables and then write them I can write them as they are created and re-use the variables.
â FoxSam12
Apr 18 at 17:29
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am getting confused here how to do this. Say I want to make a script that asks how many tracks in a cd and then asks for the track name that many times with each track formatted and exported to a file. I tried this so far but its wrong.
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
#while not amount of tracks
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
#indirection not a good idea?
#http://mywiki.wooledge.org/BashFAQ/006#Indirection
#ask for track<count> title save to variable TTITLE
read -p 'Track '$(($TRACK + 1))': ' TTITLE
TTITLE="$TTITLE:-No Name"
set TTITLE$TRACK=TTITLE
echo $!TTITLE$TRACK
(( TRACK++ ))
done
What I expect to get is a file such as:
TTITLE1=Uptown Funk!
TTITLE2=Thinking Out Loud
TTITLE3=See You Again
what i get is line 14: $!TTITLE$TRACK: bad substitution
and set | grep TITLE
returns nothing so no variable is being set (I think).
bash shell-script variable
I am getting confused here how to do this. Say I want to make a script that asks how many tracks in a cd and then asks for the track name that many times with each track formatted and exported to a file. I tried this so far but its wrong.
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
#while not amount of tracks
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
#indirection not a good idea?
#http://mywiki.wooledge.org/BashFAQ/006#Indirection
#ask for track<count> title save to variable TTITLE
read -p 'Track '$(($TRACK + 1))': ' TTITLE
TTITLE="$TTITLE:-No Name"
set TTITLE$TRACK=TTITLE
echo $!TTITLE$TRACK
(( TRACK++ ))
done
What I expect to get is a file such as:
TTITLE1=Uptown Funk!
TTITLE2=Thinking Out Loud
TTITLE3=See You Again
what i get is line 14: $!TTITLE$TRACK: bad substitution
and set | grep TITLE
returns nothing so no variable is being set (I think).
bash shell-script variable
edited Apr 18 at 20:07
cunninghamp3
473215
473215
asked Apr 18 at 16:12
FoxSam12
132
132
I just found stackoverflow.com/a/35592555/4200976 that says to use bash arrays. I will try to see if that works.
â FoxSam12
Apr 18 at 16:15
The original question as posted was unclear. I ultimately needed this list as a seperate file anyway so I dont need to have a bunch of variables and then write them I can write them as they are created and re-use the variables.
â FoxSam12
Apr 18 at 17:29
add a comment |Â
I just found stackoverflow.com/a/35592555/4200976 that says to use bash arrays. I will try to see if that works.
â FoxSam12
Apr 18 at 16:15
The original question as posted was unclear. I ultimately needed this list as a seperate file anyway so I dont need to have a bunch of variables and then write them I can write them as they are created and re-use the variables.
â FoxSam12
Apr 18 at 17:29
I just found stackoverflow.com/a/35592555/4200976 that says to use bash arrays. I will try to see if that works.
â FoxSam12
Apr 18 at 16:15
I just found stackoverflow.com/a/35592555/4200976 that says to use bash arrays. I will try to see if that works.
â FoxSam12
Apr 18 at 16:15
The original question as posted was unclear. I ultimately needed this list as a seperate file anyway so I dont need to have a bunch of variables and then write them I can write them as they are created and re-use the variables.
â FoxSam12
Apr 18 at 17:29
The original question as posted was unclear. I ultimately needed this list as a seperate file anyway so I dont need to have a bunch of variables and then write them I can write them as they are created and re-use the variables.
â FoxSam12
Apr 18 at 17:29
add a comment |Â
4 Answers
4
active
oldest
votes
up vote
2
down vote
accepted
UPDATE:
To print to a file as you indicate, here's an updated script:
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
echo "TTITLE$TRACK=$TTITLE:-No Name" >> ./track_output.txt
(( TRACK++ ))
done
To answer the title of your question, fixing your script to work, and going that little bit farther to spit the results into an array indexed by track number (per your comment):
#!/bin/bash
declare -a TRACK_ARRAY
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
TRACK_ARRAY[$TRACK]="$TTITLE:-No Name"
(( TRACK++ ))
done
echo "$TRACK_ARRAY[*]"
This takes your input and loops through, correctly asking for TRACK1
through TRACKN
where N
is the number entered by the user. At the end I simply print all indices of the array, since I have no idea how you are utilizing it. This page is a start (from TLDP) on how you might work with that array in bash
You were indexing incorrectly (would have caught that quickly once you got it to run), but another problem you had was that you were trying to assign a variable name which itself had a $
contained within it: set TTITLE$TRACK=TTITLE
- this will not create a variable named TTITLE#
where #
is the value of $TRACK
. I can't confidently tell you what this does.
When trying to use that variable you did this: echo $!TTITLE$TRACK
, in which the bang (!
) is actually a bang command trying to find the most recent command starting with TTITLE...
(not what you intended).
That is close. I am trying to output this to a file with each line consisting of something simmilar toTTITLE1=Uptown Funk!
etc... I'll work on that and see if I can figure it out.
â FoxSam12
Apr 18 at 16:55
@FoxSam, check out my update, whichecho
s to a file in the same directory.
â cunninghamp3
Apr 18 at 17:01
add a comment |Â
up vote
1
down vote
Whenever you find yourself trying to dynamically assign variable names, you should ask yourself if there's a higher-order data structure that can solve your problem. In other words, keep data out of your variable names. I think arrays are a good solution.
They are but I don't understand how to use the array in the next step as variable names. I can create an array with TTITLE1 ... etc but how do I loop through the array and ask for userinput to assign a value using the array as the variable names?
â FoxSam12
Apr 18 at 16:42
add a comment |Â
up vote
1
down vote
Commenting to cunninghamp3's answer I realised I don't need to use variables or arrays I can just list everything into a file simply step by step. This is what I ended up with.
#!/bin/bash
i=1
#clear the template file and start blank
echo "#Template file of CD Tracks"> ./template.txt
read -p 'How many tracks are there?' TRACKCOUNT
while [ $i -le $TRACKCOUNT ]
do
read -p 'Track '$i': ' TRACK
TRACK="$TRACK:-Track #"$i""
echo ""TTITLE"$((i-1))"="$TRACK" >> ./template.txt
(( i++ ))
done
add a comment |Â
up vote
0
down vote
get the user to write the track titles into a file, one per line.
in your script read the titles into an array:
mapfile -t titles < track_title_file.txt
then process the elements. For example:
for index in "$!titles[@]"; do
printf "TITLE%d=%sn" "$index" "$titles[index]"
done
add a comment |Â
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
UPDATE:
To print to a file as you indicate, here's an updated script:
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
echo "TTITLE$TRACK=$TTITLE:-No Name" >> ./track_output.txt
(( TRACK++ ))
done
To answer the title of your question, fixing your script to work, and going that little bit farther to spit the results into an array indexed by track number (per your comment):
#!/bin/bash
declare -a TRACK_ARRAY
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
TRACK_ARRAY[$TRACK]="$TTITLE:-No Name"
(( TRACK++ ))
done
echo "$TRACK_ARRAY[*]"
This takes your input and loops through, correctly asking for TRACK1
through TRACKN
where N
is the number entered by the user. At the end I simply print all indices of the array, since I have no idea how you are utilizing it. This page is a start (from TLDP) on how you might work with that array in bash
You were indexing incorrectly (would have caught that quickly once you got it to run), but another problem you had was that you were trying to assign a variable name which itself had a $
contained within it: set TTITLE$TRACK=TTITLE
- this will not create a variable named TTITLE#
where #
is the value of $TRACK
. I can't confidently tell you what this does.
When trying to use that variable you did this: echo $!TTITLE$TRACK
, in which the bang (!
) is actually a bang command trying to find the most recent command starting with TTITLE...
(not what you intended).
That is close. I am trying to output this to a file with each line consisting of something simmilar toTTITLE1=Uptown Funk!
etc... I'll work on that and see if I can figure it out.
â FoxSam12
Apr 18 at 16:55
@FoxSam, check out my update, whichecho
s to a file in the same directory.
â cunninghamp3
Apr 18 at 17:01
add a comment |Â
up vote
2
down vote
accepted
UPDATE:
To print to a file as you indicate, here's an updated script:
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
echo "TTITLE$TRACK=$TTITLE:-No Name" >> ./track_output.txt
(( TRACK++ ))
done
To answer the title of your question, fixing your script to work, and going that little bit farther to spit the results into an array indexed by track number (per your comment):
#!/bin/bash
declare -a TRACK_ARRAY
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
TRACK_ARRAY[$TRACK]="$TTITLE:-No Name"
(( TRACK++ ))
done
echo "$TRACK_ARRAY[*]"
This takes your input and loops through, correctly asking for TRACK1
through TRACKN
where N
is the number entered by the user. At the end I simply print all indices of the array, since I have no idea how you are utilizing it. This page is a start (from TLDP) on how you might work with that array in bash
You were indexing incorrectly (would have caught that quickly once you got it to run), but another problem you had was that you were trying to assign a variable name which itself had a $
contained within it: set TTITLE$TRACK=TTITLE
- this will not create a variable named TTITLE#
where #
is the value of $TRACK
. I can't confidently tell you what this does.
When trying to use that variable you did this: echo $!TTITLE$TRACK
, in which the bang (!
) is actually a bang command trying to find the most recent command starting with TTITLE...
(not what you intended).
That is close. I am trying to output this to a file with each line consisting of something simmilar toTTITLE1=Uptown Funk!
etc... I'll work on that and see if I can figure it out.
â FoxSam12
Apr 18 at 16:55
@FoxSam, check out my update, whichecho
s to a file in the same directory.
â cunninghamp3
Apr 18 at 17:01
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
UPDATE:
To print to a file as you indicate, here's an updated script:
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
echo "TTITLE$TRACK=$TTITLE:-No Name" >> ./track_output.txt
(( TRACK++ ))
done
To answer the title of your question, fixing your script to work, and going that little bit farther to spit the results into an array indexed by track number (per your comment):
#!/bin/bash
declare -a TRACK_ARRAY
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
TRACK_ARRAY[$TRACK]="$TTITLE:-No Name"
(( TRACK++ ))
done
echo "$TRACK_ARRAY[*]"
This takes your input and loops through, correctly asking for TRACK1
through TRACKN
where N
is the number entered by the user. At the end I simply print all indices of the array, since I have no idea how you are utilizing it. This page is a start (from TLDP) on how you might work with that array in bash
You were indexing incorrectly (would have caught that quickly once you got it to run), but another problem you had was that you were trying to assign a variable name which itself had a $
contained within it: set TTITLE$TRACK=TTITLE
- this will not create a variable named TTITLE#
where #
is the value of $TRACK
. I can't confidently tell you what this does.
When trying to use that variable you did this: echo $!TTITLE$TRACK
, in which the bang (!
) is actually a bang command trying to find the most recent command starting with TTITLE...
(not what you intended).
UPDATE:
To print to a file as you indicate, here's an updated script:
#!/bin/bash
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
echo "TTITLE$TRACK=$TTITLE:-No Name" >> ./track_output.txt
(( TRACK++ ))
done
To answer the title of your question, fixing your script to work, and going that little bit farther to spit the results into an array indexed by track number (per your comment):
#!/bin/bash
declare -a TRACK_ARRAY
read -p 'How many tracks are there?' TRACKCOUNT
TRACK=1
while [ $TRACK -le $TRACKCOUNT ]
do
read -p "Track $TRACK: " TTITLE
TRACK_ARRAY[$TRACK]="$TTITLE:-No Name"
(( TRACK++ ))
done
echo "$TRACK_ARRAY[*]"
This takes your input and loops through, correctly asking for TRACK1
through TRACKN
where N
is the number entered by the user. At the end I simply print all indices of the array, since I have no idea how you are utilizing it. This page is a start (from TLDP) on how you might work with that array in bash
You were indexing incorrectly (would have caught that quickly once you got it to run), but another problem you had was that you were trying to assign a variable name which itself had a $
contained within it: set TTITLE$TRACK=TTITLE
- this will not create a variable named TTITLE#
where #
is the value of $TRACK
. I can't confidently tell you what this does.
When trying to use that variable you did this: echo $!TTITLE$TRACK
, in which the bang (!
) is actually a bang command trying to find the most recent command starting with TTITLE...
(not what you intended).
edited Apr 18 at 17:36
answered Apr 18 at 16:48
cunninghamp3
473215
473215
That is close. I am trying to output this to a file with each line consisting of something simmilar toTTITLE1=Uptown Funk!
etc... I'll work on that and see if I can figure it out.
â FoxSam12
Apr 18 at 16:55
@FoxSam, check out my update, whichecho
s to a file in the same directory.
â cunninghamp3
Apr 18 at 17:01
add a comment |Â
That is close. I am trying to output this to a file with each line consisting of something simmilar toTTITLE1=Uptown Funk!
etc... I'll work on that and see if I can figure it out.
â FoxSam12
Apr 18 at 16:55
@FoxSam, check out my update, whichecho
s to a file in the same directory.
â cunninghamp3
Apr 18 at 17:01
That is close. I am trying to output this to a file with each line consisting of something simmilar to
TTITLE1=Uptown Funk!
etc... I'll work on that and see if I can figure it out.â FoxSam12
Apr 18 at 16:55
That is close. I am trying to output this to a file with each line consisting of something simmilar to
TTITLE1=Uptown Funk!
etc... I'll work on that and see if I can figure it out.â FoxSam12
Apr 18 at 16:55
@FoxSam, check out my update, which
echo
s to a file in the same directory.â cunninghamp3
Apr 18 at 17:01
@FoxSam, check out my update, which
echo
s to a file in the same directory.â cunninghamp3
Apr 18 at 17:01
add a comment |Â
up vote
1
down vote
Whenever you find yourself trying to dynamically assign variable names, you should ask yourself if there's a higher-order data structure that can solve your problem. In other words, keep data out of your variable names. I think arrays are a good solution.
They are but I don't understand how to use the array in the next step as variable names. I can create an array with TTITLE1 ... etc but how do I loop through the array and ask for userinput to assign a value using the array as the variable names?
â FoxSam12
Apr 18 at 16:42
add a comment |Â
up vote
1
down vote
Whenever you find yourself trying to dynamically assign variable names, you should ask yourself if there's a higher-order data structure that can solve your problem. In other words, keep data out of your variable names. I think arrays are a good solution.
They are but I don't understand how to use the array in the next step as variable names. I can create an array with TTITLE1 ... etc but how do I loop through the array and ask for userinput to assign a value using the array as the variable names?
â FoxSam12
Apr 18 at 16:42
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Whenever you find yourself trying to dynamically assign variable names, you should ask yourself if there's a higher-order data structure that can solve your problem. In other words, keep data out of your variable names. I think arrays are a good solution.
Whenever you find yourself trying to dynamically assign variable names, you should ask yourself if there's a higher-order data structure that can solve your problem. In other words, keep data out of your variable names. I think arrays are a good solution.
answered Apr 18 at 16:34
hhoke1
31416
31416
They are but I don't understand how to use the array in the next step as variable names. I can create an array with TTITLE1 ... etc but how do I loop through the array and ask for userinput to assign a value using the array as the variable names?
â FoxSam12
Apr 18 at 16:42
add a comment |Â
They are but I don't understand how to use the array in the next step as variable names. I can create an array with TTITLE1 ... etc but how do I loop through the array and ask for userinput to assign a value using the array as the variable names?
â FoxSam12
Apr 18 at 16:42
They are but I don't understand how to use the array in the next step as variable names. I can create an array with TTITLE1 ... etc but how do I loop through the array and ask for userinput to assign a value using the array as the variable names?
â FoxSam12
Apr 18 at 16:42
They are but I don't understand how to use the array in the next step as variable names. I can create an array with TTITLE1 ... etc but how do I loop through the array and ask for userinput to assign a value using the array as the variable names?
â FoxSam12
Apr 18 at 16:42
add a comment |Â
up vote
1
down vote
Commenting to cunninghamp3's answer I realised I don't need to use variables or arrays I can just list everything into a file simply step by step. This is what I ended up with.
#!/bin/bash
i=1
#clear the template file and start blank
echo "#Template file of CD Tracks"> ./template.txt
read -p 'How many tracks are there?' TRACKCOUNT
while [ $i -le $TRACKCOUNT ]
do
read -p 'Track '$i': ' TRACK
TRACK="$TRACK:-Track #"$i""
echo ""TTITLE"$((i-1))"="$TRACK" >> ./template.txt
(( i++ ))
done
add a comment |Â
up vote
1
down vote
Commenting to cunninghamp3's answer I realised I don't need to use variables or arrays I can just list everything into a file simply step by step. This is what I ended up with.
#!/bin/bash
i=1
#clear the template file and start blank
echo "#Template file of CD Tracks"> ./template.txt
read -p 'How many tracks are there?' TRACKCOUNT
while [ $i -le $TRACKCOUNT ]
do
read -p 'Track '$i': ' TRACK
TRACK="$TRACK:-Track #"$i""
echo ""TTITLE"$((i-1))"="$TRACK" >> ./template.txt
(( i++ ))
done
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Commenting to cunninghamp3's answer I realised I don't need to use variables or arrays I can just list everything into a file simply step by step. This is what I ended up with.
#!/bin/bash
i=1
#clear the template file and start blank
echo "#Template file of CD Tracks"> ./template.txt
read -p 'How many tracks are there?' TRACKCOUNT
while [ $i -le $TRACKCOUNT ]
do
read -p 'Track '$i': ' TRACK
TRACK="$TRACK:-Track #"$i""
echo ""TTITLE"$((i-1))"="$TRACK" >> ./template.txt
(( i++ ))
done
Commenting to cunninghamp3's answer I realised I don't need to use variables or arrays I can just list everything into a file simply step by step. This is what I ended up with.
#!/bin/bash
i=1
#clear the template file and start blank
echo "#Template file of CD Tracks"> ./template.txt
read -p 'How many tracks are there?' TRACKCOUNT
while [ $i -le $TRACKCOUNT ]
do
read -p 'Track '$i': ' TRACK
TRACK="$TRACK:-Track #"$i""
echo ""TTITLE"$((i-1))"="$TRACK" >> ./template.txt
(( i++ ))
done
answered Apr 18 at 17:26
FoxSam12
132
132
add a comment |Â
add a comment |Â
up vote
0
down vote
get the user to write the track titles into a file, one per line.
in your script read the titles into an array:
mapfile -t titles < track_title_file.txt
then process the elements. For example:
for index in "$!titles[@]"; do
printf "TITLE%d=%sn" "$index" "$titles[index]"
done
add a comment |Â
up vote
0
down vote
get the user to write the track titles into a file, one per line.
in your script read the titles into an array:
mapfile -t titles < track_title_file.txt
then process the elements. For example:
for index in "$!titles[@]"; do
printf "TITLE%d=%sn" "$index" "$titles[index]"
done
add a comment |Â
up vote
0
down vote
up vote
0
down vote
get the user to write the track titles into a file, one per line.
in your script read the titles into an array:
mapfile -t titles < track_title_file.txt
then process the elements. For example:
for index in "$!titles[@]"; do
printf "TITLE%d=%sn" "$index" "$titles[index]"
done
get the user to write the track titles into a file, one per line.
in your script read the titles into an array:
mapfile -t titles < track_title_file.txt
then process the elements. For example:
for index in "$!titles[@]"; do
printf "TITLE%d=%sn" "$index" "$titles[index]"
done
answered Apr 18 at 17:49
glenn jackman
45.9k265100
45.9k265100
add a comment |Â
add a comment |Â
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%2f438550%2fbash-script-ask-for-an-amount-and-then-ask-that-many-prompts%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
I just found stackoverflow.com/a/35592555/4200976 that says to use bash arrays. I will try to see if that works.
â FoxSam12
Apr 18 at 16:15
The original question as posted was unclear. I ultimately needed this list as a seperate file anyway so I dont need to have a bunch of variables and then write them I can write them as they are created and re-use the variables.
â FoxSam12
Apr 18 at 17:29