Thread: mass script generator?
i have hundreds of .zip n64 games. want write small scripts each 1 @ once using line in each script:
there program create script command in each script proper .zip filename, , name script same .zip filename?
i.e.
1. scans mortalcombat.zip (file)
2. inputs in script, mupen64plus --fullscreen --nogui --noosd /mnt/tera/roms/mortalcombat.zip
3 names script mortalcombat.sh
you forgot
4 chmod +x mortalcombat.sh (besides kombat)
can create script act universal launcher, let's run_game.sh
or alias in shell configuration - best optioncode:#!/bin/bash echo mupen64plus --fullscreen --nogui --noosd "$1"
gedit ~/.bashrc , find section aliases , add own
you run run_game mk2.zip (and shell if tapped tab autocomplete existing file names)code:alias run_game='mupen64plus --fullscreen --nogui --noosd'
if want generate scripts each existing zip
code:for z in *.zip; scr="${z%.zip}.sh"; echo $'#!/bin/bash\n\nmupen64plus --fullscreen --nogui --noosd "'"$z"'"' > "$scr"; chmod +x "$scr"; done
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] mass script generator?
Ubuntu
Comments
Post a Comment