Hot answers tagged

1

This answer assumes "all these lines except the first instance" means "… except the first instance of name=muzi", not "… except the first instance of name=muzi standalone=true". So the first name=muzi is "the first instance", regardless what standalone is or even if it occurs in the line at all. The answer also assumes ...


1

For context, I'm trying to edit the level-name value in my Minecraft server's server.properties file, which isn't exactly a bash script by extension or shebang, but follows the exact same syntax. No it does not. It follows a superficially similar format of "key=value" assignments, but the actual syntax of Java .properties files is completely ...


1

now=$(date +%s) last_bought=$(date -d '-1 week -3 days -6 hours -34 minutes' +%s) elapsed=$(( (now - last_bought) / 3600)) # truncate to hours ((hrs = elapsed % 24, elapsed /= 24)) ((days = elapsed % 7)) ((weeks = elapsed / 7)) echo "$weeks weeks, $days days, $hrs hours" 1 weeks, 3 days, 6 hours


1

MediaInfo template feature was a "proof of concept", checking if some people were interested in that, and it has a couple of flaws, including bugs in the template parser i.e. the extra ")" in the output should not be there. Also you can use some formatting integrated in MediaInfo e.g. using Kb/s or Mb/s when relevant. MediaInfo.exe "-...


1

AutoHotkey will allow you to disable Ctrl+Space if that's what you're asking... use the default script when it installs or create a new one, and add this: #Persistent ^Space::Return


1

Very interesting issue here. Based on what I understand about how getopts works, this use of a single colon (:) means that the option value must be set: getopts "b:h" And if you wanted it to be optional, you would need to set two colons (::) and also have nothing follow that like this: getopts "hb::" But that hb:: doesn’t work. I played ...


1

A tool more adapted to the task is AutoHotkey. It comes with the possibility to Convert a Script to an EXE (Ahk2Exe). You may use the Pulover's Macro Creator to capture events and include them in a AutoHotkey script. You will find much information in the AutoHotkey website. For specific problems, Google is your friend.


1

Sorry for the late answer. Couldn't it be achieved with scheduled tasks ? Like create a scheduled task that runs once after reboot and launches the script where you want to resume it ?


Only top voted, non community-wiki answers of a minimum length are eligible