Eccomi, sei un mito
Funziona alla grande, e adattandola al mio caso, per fare un esempio con due soli profili, il codice viene così:
#!/bin/sh
firefox -P 29 https://www.bing.com/search?q=1 https://www.bing.com/search?q=2 https://www.bing.com/search?q=3 https://www.bing.com/search?q=4 https://www.bing.com/search?q=5 https://www.bing.com/search?q=6 https://www.bing.com/search?q=7 https://www.bing.com/search?q=8 https://www.bing.com/search?q=9 https://www.bing.com/search?q=10 https://www.bing.com/search?q=11 https://www.bing.com/search?q=12 https://www.bing.com/search?q=13 https://www.bing.com/search?q=14 https://www.bing.com/search?q=15 https://www.bing.com/search?q=16 https://www.bing.com/search?q=17 https://www.bing.com/search?q=18 https://www.bing.com/search?q=19 https://www.bing.com/search?q=20 https://www.bing.com/search?q=21 https://www.bing.com/search?q=22 https://www.bing.com/search?q=23 https://www.bing.com/search?q=24 https://www.bing.com/search?q=25 https://www.bing.com/search?q=26 https://www.bing.com/search?q=27 https://www.bing.com/search?q=28 https://www.bing.com/search?q=29 https://www.bing.com/search?q=30 https://www.bing.com/search?q=31 https://www.bing.com/search?q=32 https://www.bing.com/search?q=33 https://www.bing.com/search?q=34 https://www.bing.com/search?q=35 &
sleep 20
killall -s SIGTERM firefox-bin
sleep 20
firefox -P 28 https://www.bing.com/search?q=1 https://www.bing.com/search?q=2 https://www.bing.com/search?q=3 https://www.bing.com/search?q=4 https://www.bing.com/search?q=5 https://www.bing.com/search?q=6 https://www.bing.com/search?q=7 https://www.bing.com/search?q=8 https://www.bing.com/search?q=9 https://www.bing.com/search?q=10 https://www.bing.com/search?q=11 https://www.bing.com/search?q=12 https://www.bing.com/search?q=13 https://www.bing.com/search?q=14 https://www.bing.com/search?q=15 https://www.bing.com/search?q=16 https://www.bing.com/search?q=17 https://www.bing.com/search?q=18 https://www.bing.com/search?q=19 https://www.bing.com/search?q=20 https://www.bing.com/search?q=21 https://www.bing.com/search?q=22 https://www.bing.com/search?q=23 https://www.bing.com/search?q=24 https://www.bing.com/search?q=25 https://www.bing.com/search?q=26 https://www.bing.com/search?q=27 https://www.bing.com/search?q=28 https://www.bing.com/search?q=29 https://www.bing.com/search?q=30 https://www.bing.com/search?q=31 https://www.bing.com/search?q=32 https://www.bing.com/search?q=33 https://www.bing.com/search?q=34 https://www.bing.com/search?q=35 &
sleep 20
killall -s SIGTERM firefox-bin
sleep 20
exit
e funziona alla grande, solo che fare 35 ricerche tutte insieme è un carico un po' grande, c'è modo di mettere uno sleep tra una ricerca e l'altra? Ho provato a metterlo ma pare non funzionare, non ho ben capito se devo andare a capo con
& firefox -P 28 https://www.bing.com/search?q=1 &
sleep 1.5 &
https://www.bing.com/search?q=2
o metterlo nella stessa riga, tipo
firefox -P 28 https://www.bing.com/search?q=1 sleep 1.5 https://www.bing.com/search?q=2
Inoltre ti confesso che devo fare un'altra operazione... una volta fatte le 35 ricerche per 30 profili, devo ripeterle, cambiando lo user agent (devo camuffare l'utilizzo di Microsoft Edge
), quindi dovrei riaprire tutti i profili manualmente, cambiare lo user agent, chiuderli e far ripartire lo script.
Ma provando a riaprire i profili, probabilmente a causa del killall, mi si è presentato l'errore "Avvia una nuova sessione o ripristina sessione".
Vabbè poco male perché clicco su Avvia una nuova sessione e amen, però mi chiedevo se si potesse fare uno script che permettesse di aprire 4-5 profili alla volta, senza fare nulla, aprirli e basta, così mi evito di aprirli uno per uno... cambio lo user agent, chiudo e faccio partire lo script.
L'ho fatto così:
#!/bin/sh
firefox -P 29 &
sleep 5
firefox -P 28
sleep 5
exit
ma nel terminale lo script non viene terminato, rimane in attesa... questo è quello che è uscito:
iolanda@iolandamint:~$ ./3.sh
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
[2022-12-22T18:20:11Z ERROR glean_core::metrics::ping] Invalid reason code startup for ping background-update
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
ATTENTION: default value of option mesa_glthread overridden by environment.
[2022-12-22T18:20:16Z ERROR glean_core::metrics::ping] Invalid reason code startup for ping background-update
Alla fine mi sa dovrò pagarti una cena (di pesce)
Grazie infinite per tutto l'aiuto che mi stai dando soprattutto perché mi stai spiegando anche nel dettaglio cosa significa tutto ciò che hai messo nei codici quindi un aiuto doppio 🙏🙏🙏