3
How to make a script in bash that:
- Based on this example url: http://www.exemple.com.br/1/43530/12620/index.html
- Select the folder 12620.
- Open the index.html of this folder in a Firefox tab in Kali (Debian)
- Select the additional 12620 folder +1, getting 12621, and open the index.html of that folder in a new tab.
- And so on and so forth.
I thought of something like:
FOLDER=12620
for (($FOLDER, $FOLDER =< 12660, $FOLDER++))
do
firefox -new-tab http://www.exemple.com/1/43530/.'$FOLDER'./index.html
done
I did it in Javascript, just wanted to pass to Bash and open in Firefox
<!DOCTYPE html>
<html>
<body>
<button onclick="abrirHTML()">Abrir</button>
<script>
function abrirHTML() {
var folder = 12690;
for (folder = 12690; folder < 12695; folder++) {
window.open("http://www.exemple.com/1/43530/" + folder + "/index.html");
}
}
</script>
</body>
</html>
Welcome to Sopt. Edith your question and show us what you have tried. I also recommend reading How to create a Minimum, Complete and Verifiable example
– Jéf Bueno
I edited @Jéfersonbueno
– Kaka
@Kaka And did your script not work? Any errors? Have you considered using Python for this script instead of BASH?
– felipsmartins
Will you open 5 new tabs? 12690 to 12695? Would this be the loop? I didn’t understand why javascript values were different from your bash, js you used 12690 and bash used 12660.
– Guilherme Nascimento
@Guillermo hermetypo
– Kaka