Einige Bash-Liebe; Nenne es, wie du willst. Ich habe thescript.sh verwendet
#!/bin/bash echo '[General]' echo 'StartWithLastProfile=1' echo '' n=0 for file in * ; do if [ -d $file ] ; then if [[ "$file" =~ .+\.(.+) ]] ; then echo "[Profile$]" echo "Name=$" echo "IsRelative=1" echo "Path=$" if [[ $ == default ]] ; then echo "Default=1" fi echo "" let n++ fi fi done
Verwendungszweck
Legen Sie es zuerst in Ihr Mozilla-Profilverzeichnis ab (zB ~ / .mozilla / firefox für mich).
chmod +x thescript.sh ./thescript.sh ./thescript.sh > profiles.ini
Ausgabe
nex@Computer:~/.mozilla/firefox > ./thescript.sh [General] StartWithLastProfile=1 [Profile0] Name=default IsRelative=1 Path=03k202kd.default Default=1 [Profile1] Name=test IsRelative=1 Path=a023lkdl.test nex@Computer:~/.mozilla/firefox > ./thescript.sh > profiles.ini