Shell Script, display directory listing to option input / trying to select two files to compare
I am trying to have the user select two files from a numbered list which is derived from a directory listing and will eventually be turned into a variable. Im just a network engineer trying to automate combining some show output commands from a switch.
This is what I have that is not working:
echo "Please Select the Show interface status file"
select FILE1 in *;
echo "Please Select the Show Vlan file"
select FILE2 in *;
do
When I am able to select files from the directory, I plan to "cat $FILE1 > file1" & "cat $FILE2 > file2" then I will combine them.
shell-script shell
add a comment |
I am trying to have the user select two files from a numbered list which is derived from a directory listing and will eventually be turned into a variable. Im just a network engineer trying to automate combining some show output commands from a switch.
This is what I have that is not working:
echo "Please Select the Show interface status file"
select FILE1 in *;
echo "Please Select the Show Vlan file"
select FILE2 in *;
do
When I am able to select files from the directory, I plan to "cat $FILE1 > file1" & "cat $FILE2 > file2" then I will combine them.
shell-script shell
Hi @dis0wned. Your questions is completely unclear. kindly, would you please include example for the input and the expected output. this may help to clarify things! We appreciate your clarifications!
– user88036
Sep 21 at 18:00
1
"Completely unclear" may be an overstatement; I believe I got the gist of the question quite readily.
– DopeGhoti
Sep 21 at 18:12
add a comment |
I am trying to have the user select two files from a numbered list which is derived from a directory listing and will eventually be turned into a variable. Im just a network engineer trying to automate combining some show output commands from a switch.
This is what I have that is not working:
echo "Please Select the Show interface status file"
select FILE1 in *;
echo "Please Select the Show Vlan file"
select FILE2 in *;
do
When I am able to select files from the directory, I plan to "cat $FILE1 > file1" & "cat $FILE2 > file2" then I will combine them.
shell-script shell
I am trying to have the user select two files from a numbered list which is derived from a directory listing and will eventually be turned into a variable. Im just a network engineer trying to automate combining some show output commands from a switch.
This is what I have that is not working:
echo "Please Select the Show interface status file"
select FILE1 in *;
echo "Please Select the Show Vlan file"
select FILE2 in *;
do
When I am able to select files from the directory, I plan to "cat $FILE1 > file1" & "cat $FILE2 > file2" then I will combine them.
shell-script shell
shell-script shell
edited yesterday
Rui F Ribeiro
38.8k1479128
38.8k1479128
asked Sep 21 at 17:46
dis0wned
1
1
Hi @dis0wned. Your questions is completely unclear. kindly, would you please include example for the input and the expected output. this may help to clarify things! We appreciate your clarifications!
– user88036
Sep 21 at 18:00
1
"Completely unclear" may be an overstatement; I believe I got the gist of the question quite readily.
– DopeGhoti
Sep 21 at 18:12
add a comment |
Hi @dis0wned. Your questions is completely unclear. kindly, would you please include example for the input and the expected output. this may help to clarify things! We appreciate your clarifications!
– user88036
Sep 21 at 18:00
1
"Completely unclear" may be an overstatement; I believe I got the gist of the question quite readily.
– DopeGhoti
Sep 21 at 18:12
Hi @dis0wned. Your questions is completely unclear. kindly, would you please include example for the input and the expected output. this may help to clarify things! We appreciate your clarifications!
– user88036
Sep 21 at 18:00
Hi @dis0wned. Your questions is completely unclear. kindly, would you please include example for the input and the expected output. this may help to clarify things! We appreciate your clarifications!
– user88036
Sep 21 at 18:00
1
1
"Completely unclear" may be an overstatement; I believe I got the gist of the question quite readily.
– DopeGhoti
Sep 21 at 18:12
"Completely unclear" may be an overstatement; I believe I got the gist of the question quite readily.
– DopeGhoti
Sep 21 at 18:12
add a comment |
2 Answers
2
active
oldest
votes
Each select
statement needs to be completed before moving on to the next one. A select
statement is actually a special type of loop.
Let's say that I have a set of files, examplefile01
through examplefile10
. If I had a script like this:
select f in example*; do
echo "You selected $f"
break
done
It would look like this in execution:
$ ./470595.sh
1) examplefile01 4) examplefile04 7) examplefile07 10) examplefile10
2) examplefile02 5) examplefile05 8) examplefile08
3) examplefile03 6) examplefile06 9) examplefile09
#? 5
You selected examplefile05
The break
statement is important, because otherwise the select
statement would loop back to presenting the options again.
So in your case, you might want something like:
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
You can also get a little clever and eschew the echo
statements by modifying the prompt provided by the select
statement by setting PS3:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
Also, since you're planning on combining the files, it might be easier to do that at the same time as the final selection:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE1" "$FILE2" > outputfile
break
done
add a comment |
Thank you for the help, I was able to get it working. Its not pretty but it does what I want
#Combine Show Vlan and Show interface status Function
combinevlanshint()
{
cd $shintstatvlan
clear
#Ask for Hostname
echo "Names can not contain spaces:"
echo " "
echo "Please enter the Hostname"
read "hostname"
clear
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" > $shintstatvlan/file1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" > $shintstatvlan/file2
break
done
echo "You picked $FILE1 and $FILE2 , These files will now be combined. Press any key to continue"
read -n 1
cat $FILE1 > file1
cat $FILE2 > file2
sed 's/[[:space:]]*,[[:space:]]*/,/g' file1 > file1.$$ && awk -F, 'FNR==NR{f2[$1]=$2;next} FNR==1{print $0, "VLAN Name";next} {print $0,($5 in f2)?f2[$5]:"NA"}' OFS=, file2 file1.$$ > file3 && rm file1.$$
mv file3
mv --backup=t $shintstatvlan/file3 $outputdir/$hostname.shintstatwvlans.txt
rm $shintstatvlan/file1 $shintstatvlan/file2
break
clear
mainmenu
}
1
Indentation is worth working on, as it makes code so much clearer to read (and maintain). Ensure your first line is#!/bin/bash
to tell the kernel that it's abash
shell script. Continue the (good) habit of double-quoting strings that use variables - you've got most of them here but not all. In particular remember quotes formv --backup=t "$shintstatvlan/file3" "$outputdir/$hostname.shintstatwvlans.txt"
andrm "$shintstatvlan/file1" "$shintstatvlan/file2"
.
– roaima
Sep 21 at 21:03
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470595%2fshell-script-display-directory-listing-to-option-input-trying-to-select-two%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Each select
statement needs to be completed before moving on to the next one. A select
statement is actually a special type of loop.
Let's say that I have a set of files, examplefile01
through examplefile10
. If I had a script like this:
select f in example*; do
echo "You selected $f"
break
done
It would look like this in execution:
$ ./470595.sh
1) examplefile01 4) examplefile04 7) examplefile07 10) examplefile10
2) examplefile02 5) examplefile05 8) examplefile08
3) examplefile03 6) examplefile06 9) examplefile09
#? 5
You selected examplefile05
The break
statement is important, because otherwise the select
statement would loop back to presenting the options again.
So in your case, you might want something like:
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
You can also get a little clever and eschew the echo
statements by modifying the prompt provided by the select
statement by setting PS3:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
Also, since you're planning on combining the files, it might be easier to do that at the same time as the final selection:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE1" "$FILE2" > outputfile
break
done
add a comment |
Each select
statement needs to be completed before moving on to the next one. A select
statement is actually a special type of loop.
Let's say that I have a set of files, examplefile01
through examplefile10
. If I had a script like this:
select f in example*; do
echo "You selected $f"
break
done
It would look like this in execution:
$ ./470595.sh
1) examplefile01 4) examplefile04 7) examplefile07 10) examplefile10
2) examplefile02 5) examplefile05 8) examplefile08
3) examplefile03 6) examplefile06 9) examplefile09
#? 5
You selected examplefile05
The break
statement is important, because otherwise the select
statement would loop back to presenting the options again.
So in your case, you might want something like:
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
You can also get a little clever and eschew the echo
statements by modifying the prompt provided by the select
statement by setting PS3:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
Also, since you're planning on combining the files, it might be easier to do that at the same time as the final selection:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE1" "$FILE2" > outputfile
break
done
add a comment |
Each select
statement needs to be completed before moving on to the next one. A select
statement is actually a special type of loop.
Let's say that I have a set of files, examplefile01
through examplefile10
. If I had a script like this:
select f in example*; do
echo "You selected $f"
break
done
It would look like this in execution:
$ ./470595.sh
1) examplefile01 4) examplefile04 7) examplefile07 10) examplefile10
2) examplefile02 5) examplefile05 8) examplefile08
3) examplefile03 6) examplefile06 9) examplefile09
#? 5
You selected examplefile05
The break
statement is important, because otherwise the select
statement would loop back to presenting the options again.
So in your case, you might want something like:
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
You can also get a little clever and eschew the echo
statements by modifying the prompt provided by the select
statement by setting PS3:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
Also, since you're planning on combining the files, it might be easier to do that at the same time as the final selection:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE1" "$FILE2" > outputfile
break
done
Each select
statement needs to be completed before moving on to the next one. A select
statement is actually a special type of loop.
Let's say that I have a set of files, examplefile01
through examplefile10
. If I had a script like this:
select f in example*; do
echo "You selected $f"
break
done
It would look like this in execution:
$ ./470595.sh
1) examplefile01 4) examplefile04 7) examplefile07 10) examplefile10
2) examplefile02 5) examplefile05 8) examplefile08
3) examplefile03 6) examplefile06 9) examplefile09
#? 5
You selected examplefile05
The break
statement is important, because otherwise the select
statement would loop back to presenting the options again.
So in your case, you might want something like:
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
You can also get a little clever and eschew the echo
statements by modifying the prompt provided by the select
statement by setting PS3:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
cat "$FILE1" >> outputfile1
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE2" >> outputfile2
break
done
Also, since you're planning on combining the files, it might be easier to do that at the same time as the final selection:
PS3="Please Select the Show interface status file )"
select FILE1 in *; do
break
done
PS3="Please Select the Show Vlan file )"
select FILE2 in *; do
cat "$FILE1" "$FILE2" > outputfile
break
done
edited Sep 21 at 18:16
answered Sep 21 at 18:01
DopeGhoti
43.1k55382
43.1k55382
add a comment |
add a comment |
Thank you for the help, I was able to get it working. Its not pretty but it does what I want
#Combine Show Vlan and Show interface status Function
combinevlanshint()
{
cd $shintstatvlan
clear
#Ask for Hostname
echo "Names can not contain spaces:"
echo " "
echo "Please enter the Hostname"
read "hostname"
clear
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" > $shintstatvlan/file1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" > $shintstatvlan/file2
break
done
echo "You picked $FILE1 and $FILE2 , These files will now be combined. Press any key to continue"
read -n 1
cat $FILE1 > file1
cat $FILE2 > file2
sed 's/[[:space:]]*,[[:space:]]*/,/g' file1 > file1.$$ && awk -F, 'FNR==NR{f2[$1]=$2;next} FNR==1{print $0, "VLAN Name";next} {print $0,($5 in f2)?f2[$5]:"NA"}' OFS=, file2 file1.$$ > file3 && rm file1.$$
mv file3
mv --backup=t $shintstatvlan/file3 $outputdir/$hostname.shintstatwvlans.txt
rm $shintstatvlan/file1 $shintstatvlan/file2
break
clear
mainmenu
}
1
Indentation is worth working on, as it makes code so much clearer to read (and maintain). Ensure your first line is#!/bin/bash
to tell the kernel that it's abash
shell script. Continue the (good) habit of double-quoting strings that use variables - you've got most of them here but not all. In particular remember quotes formv --backup=t "$shintstatvlan/file3" "$outputdir/$hostname.shintstatwvlans.txt"
andrm "$shintstatvlan/file1" "$shintstatvlan/file2"
.
– roaima
Sep 21 at 21:03
add a comment |
Thank you for the help, I was able to get it working. Its not pretty but it does what I want
#Combine Show Vlan and Show interface status Function
combinevlanshint()
{
cd $shintstatvlan
clear
#Ask for Hostname
echo "Names can not contain spaces:"
echo " "
echo "Please enter the Hostname"
read "hostname"
clear
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" > $shintstatvlan/file1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" > $shintstatvlan/file2
break
done
echo "You picked $FILE1 and $FILE2 , These files will now be combined. Press any key to continue"
read -n 1
cat $FILE1 > file1
cat $FILE2 > file2
sed 's/[[:space:]]*,[[:space:]]*/,/g' file1 > file1.$$ && awk -F, 'FNR==NR{f2[$1]=$2;next} FNR==1{print $0, "VLAN Name";next} {print $0,($5 in f2)?f2[$5]:"NA"}' OFS=, file2 file1.$$ > file3 && rm file1.$$
mv file3
mv --backup=t $shintstatvlan/file3 $outputdir/$hostname.shintstatwvlans.txt
rm $shintstatvlan/file1 $shintstatvlan/file2
break
clear
mainmenu
}
1
Indentation is worth working on, as it makes code so much clearer to read (and maintain). Ensure your first line is#!/bin/bash
to tell the kernel that it's abash
shell script. Continue the (good) habit of double-quoting strings that use variables - you've got most of them here but not all. In particular remember quotes formv --backup=t "$shintstatvlan/file3" "$outputdir/$hostname.shintstatwvlans.txt"
andrm "$shintstatvlan/file1" "$shintstatvlan/file2"
.
– roaima
Sep 21 at 21:03
add a comment |
Thank you for the help, I was able to get it working. Its not pretty but it does what I want
#Combine Show Vlan and Show interface status Function
combinevlanshint()
{
cd $shintstatvlan
clear
#Ask for Hostname
echo "Names can not contain spaces:"
echo " "
echo "Please enter the Hostname"
read "hostname"
clear
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" > $shintstatvlan/file1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" > $shintstatvlan/file2
break
done
echo "You picked $FILE1 and $FILE2 , These files will now be combined. Press any key to continue"
read -n 1
cat $FILE1 > file1
cat $FILE2 > file2
sed 's/[[:space:]]*,[[:space:]]*/,/g' file1 > file1.$$ && awk -F, 'FNR==NR{f2[$1]=$2;next} FNR==1{print $0, "VLAN Name";next} {print $0,($5 in f2)?f2[$5]:"NA"}' OFS=, file2 file1.$$ > file3 && rm file1.$$
mv file3
mv --backup=t $shintstatvlan/file3 $outputdir/$hostname.shintstatwvlans.txt
rm $shintstatvlan/file1 $shintstatvlan/file2
break
clear
mainmenu
}
Thank you for the help, I was able to get it working. Its not pretty but it does what I want
#Combine Show Vlan and Show interface status Function
combinevlanshint()
{
cd $shintstatvlan
clear
#Ask for Hostname
echo "Names can not contain spaces:"
echo " "
echo "Please enter the Hostname"
read "hostname"
clear
echo "Please Select the Show interface status file"
select FILE1 in *; do
cat "$FILE1" > $shintstatvlan/file1
break
done
echo "Please Select the Show Vlan file"
select FILE2 in *; do
cat "$FILE2" > $shintstatvlan/file2
break
done
echo "You picked $FILE1 and $FILE2 , These files will now be combined. Press any key to continue"
read -n 1
cat $FILE1 > file1
cat $FILE2 > file2
sed 's/[[:space:]]*,[[:space:]]*/,/g' file1 > file1.$$ && awk -F, 'FNR==NR{f2[$1]=$2;next} FNR==1{print $0, "VLAN Name";next} {print $0,($5 in f2)?f2[$5]:"NA"}' OFS=, file2 file1.$$ > file3 && rm file1.$$
mv file3
mv --backup=t $shintstatvlan/file3 $outputdir/$hostname.shintstatwvlans.txt
rm $shintstatvlan/file1 $shintstatvlan/file2
break
clear
mainmenu
}
edited Sep 21 at 21:01
roaima
42.7k551116
42.7k551116
answered Sep 21 at 18:56
dis0wned
1
1
1
Indentation is worth working on, as it makes code so much clearer to read (and maintain). Ensure your first line is#!/bin/bash
to tell the kernel that it's abash
shell script. Continue the (good) habit of double-quoting strings that use variables - you've got most of them here but not all. In particular remember quotes formv --backup=t "$shintstatvlan/file3" "$outputdir/$hostname.shintstatwvlans.txt"
andrm "$shintstatvlan/file1" "$shintstatvlan/file2"
.
– roaima
Sep 21 at 21:03
add a comment |
1
Indentation is worth working on, as it makes code so much clearer to read (and maintain). Ensure your first line is#!/bin/bash
to tell the kernel that it's abash
shell script. Continue the (good) habit of double-quoting strings that use variables - you've got most of them here but not all. In particular remember quotes formv --backup=t "$shintstatvlan/file3" "$outputdir/$hostname.shintstatwvlans.txt"
andrm "$shintstatvlan/file1" "$shintstatvlan/file2"
.
– roaima
Sep 21 at 21:03
1
1
Indentation is worth working on, as it makes code so much clearer to read (and maintain). Ensure your first line is
#!/bin/bash
to tell the kernel that it's a bash
shell script. Continue the (good) habit of double-quoting strings that use variables - you've got most of them here but not all. In particular remember quotes for mv --backup=t "$shintstatvlan/file3" "$outputdir/$hostname.shintstatwvlans.txt"
and rm "$shintstatvlan/file1" "$shintstatvlan/file2"
.– roaima
Sep 21 at 21:03
Indentation is worth working on, as it makes code so much clearer to read (and maintain). Ensure your first line is
#!/bin/bash
to tell the kernel that it's a bash
shell script. Continue the (good) habit of double-quoting strings that use variables - you've got most of them here but not all. In particular remember quotes for mv --backup=t "$shintstatvlan/file3" "$outputdir/$hostname.shintstatwvlans.txt"
and rm "$shintstatvlan/file1" "$shintstatvlan/file2"
.– roaima
Sep 21 at 21:03
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470595%2fshell-script-display-directory-listing-to-option-input-trying-to-select-two%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hi @dis0wned. Your questions is completely unclear. kindly, would you please include example for the input and the expected output. this may help to clarify things! We appreciate your clarifications!
– user88036
Sep 21 at 18:00
1
"Completely unclear" may be an overstatement; I believe I got the gist of the question quite readily.
– DopeGhoti
Sep 21 at 18:12