Posts

Showing posts with the label Script

Bash Shebang For Dummies?

Answer : If a script /path/to/foo begins with #!/bin/bash , then executing /path/to/foo arg1 arg2 is equivalent to executing /bin/bash /path/too/foo arg1 arg2 . If the shebang line is #!/bin/bash -ex , it is equivalent to executing /bin/bash -ex /path/too/foo arg1 arg2 . This feature is managed by the kernel. Note that you can portably have only one argument on the shebang line: some unices (such as Linux) only accept one argument, so that #!/bin/bash -e -x would lead to bash receiving the single five-character argument -e -x (a syntax error) rather than two arguments -e and -x . For the Bourne shell sh and derived shells such as POSIX sh, bash, ksh, and zsh: -e means that if any command fails (which it indicates by returning a nonzero status), the script will terminate immediately. -x causes the shell to print an execution trace. Other programs may understand these options but with different meanings. They are options passed to bash see help set for more info,...

Apple - Are There Greasemonkey Scripts For Safari?

Answer : Another option to run GreaseMonkey scripts is NinjaKit (which is what I use). It's a Safari 5 extension, which means it's just a tad safer than GreaseKit. I use TamperMonkey and it works surprisingly well. It's also a Safari Extension. I have tried used NinjaKit in the past but it no longer works for me, a lot of scripts simply won't work. Is there such a thing as Greasemonkey for Safari? You can use SIMBL and GreaseKit to run most Greasemonkey scripts in Safari, unmodified. Detailed installation instructions are found at this link, repeated here: Download and install SIMBL Quit Safari Download GreaseKit Drag the GreaseKit.bundle file to ~/Library/Application Support/SIMBL/Plugins . You may need to create this location if it doesn't exit Start Safari and you'll see a GreaseKit menu bar item Install scripts from http://userscripts.org -- the installation process is a little different from the Firefox approach, but it works. Or...