Backspace, Delete, and/or Return Key Stops Working in Oracle SQL Developer

So, I fire up SQL Developer to run some queries against a QC server and for some reason, I am no longer able to use the backspace, delete, or return keys to edit .sql files opened in the program.

I tried opening a new .sql file, and restarting SQL Developer.  I then tried restarting Windows.  None of those worked.

After a bit of searching I found a forum posting that indicated by going to Tools/Preferences/Accelerators and clicking the “Load Preset…” → Continue reading “Backspace, Delete, and/or Return Key Stops Working in Oracle SQL Developer”

Checking that Input or a Variable is an Integer in BASH

Here is a quick snippet for checking whether or not a variable is a valid integer in BASH.  It is also a howto for regular expressions in a shell script.

# Make sure that FOO is an integer
if [[ ! "$FOO" =~ ^[0-9]+$ ]]; then
        echo "The FOO was NOT an integer"
fi
Continue reading “Checking that Input or a Variable is an Integer in BASH”

How To Benchmark Disk I/O

Here is a quick snipped on how to benchmark Disk I/O with dd.

time sh -c "dd if=/dev/zero of=/home/rchapin/test.zeros bs=1024k count=10000 && sync"

10000+0 records in
10000+0 records out
10485760000 bytes (10 GB) copied, 81.4124 s, 129 MB/s

real    1m21.950s
user    0m0.810s
sys     0m5.474s

Will do a write test of 10GB.

You can do a similar test and read from that file generated and write to another file or /dev/null to get an idea of the read speeds.

See the → Continue reading “How To Benchmark Disk I/O”