How do you cleanly exit interactive Lua?
There is no quit keyword. Try control-D in Unix, control-Z in Windows or os.exit() if you must.
There is no quit keyword. Try control-D in Unix, control-Z in Windows or os.exit() if you must.
Inside the VBE, Go to Tools -> References, then Select Microsoft XML, v6.0 (or whatever your latest is. This will give you access to the XML Object Library. Updated with fancy pic!
You can use a here document: cat <<EOF >> outputfile some lines of text EOF
It depends on the exact encoding of the textfile, but [Environment]::NewLine usually does the trick. “This is `r`na string.”.Split([Environment]::NewLine) Output: This is a string.
The defaults command can read/write to any plist file, just give it a path minus the .plist extension: $ defaults read /Applications/Preview.app/Contents/Info CFBundleIdentifier com.apple.Preview This pulls the CFBundleIdentifier value directly from the application bundle’s Info.plist file. Defaults also works with binary plists without any extra steps.
Use the -v switch to pass in variables. sqlcmd -v varMDF=”C:\dev\SAMPLE.mdf” varLDF=”C:\dev\SAMPLE_log.ldf” Then in your script file CREATE DATABASE [SAMPLE] ON PRIMARY ( NAME = N’SAMPLE’, FILENAME = N’$(varMDF)’ , SIZE = 23552KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ) LOG ON ( NAME = N’SAMPLE_log’, FILENAME = N’$(varLDF)’ , SIZE = 29504KB , … Read more
A deleted answer was on the right track. A slight modification to your attempt: shopt -s extglob MYDIR=”./images” OTHERDIR=”./images/junk” SUFFIXES=’@(pdf|eps|jpg|svg)’ mv “$MYDIR/”*.$SUFFIXES “$OTHERDIR/” Brace expansion is done before variable expansion, but variable expansion is done before pathname expansion. So the braces are still braces when the variable is expanded in your original, but when the … Read more
${!ARRAYNAME[@]} means “the indices of ARRAYNAME“. As stated in the bash man page since ARRAYNAME is set, but as a string, not an array, it returns 0. Here’s a solution using eval. #!/usr/bin/env bash ARRAYNAME=’FRUITS’ FRUITS=( APPLE BANANA ORANGE ) eval array=\( \${${ARRAYNAME}[@]} \) for fruit in “${array[@]}”; do echo ${fruit} done What you were … Read more
adb shell getprop init.svc.bootanim This will tell you whether or not the boot animation is running. It’s what we use on our headless build server to check if the emulator is up. The sys.boot_completed from dac2009 is what lead me to find that flag. We use init.svc.bootanim instead because boot_completed has a tendency of triggering … Read more
With standard sh and bash, you can set -e It will $ help set … -e Exit immediately if a command exits with a non-zero status. It also works (from what I could gather) with zsh. It also should work for any Bourne shell descendant. With csh/tcsh, you have to launch your script with #!/bin/csh … Read more