Is there a way for a bash script to test if it can cd into a directory without actually attempting to cd into it?
I am looking for something along the lines of:
if ;then
#code to execute
fi
except in this case I don't want to test if the directory exists; what I want is to test... (8 Replies)
Hi,
I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hello,
I'm trying to test if a directory specified in a script parameter is available or not.
I wrote a little code to do so, but there's a problem because I receive an error message.
My code:
#Verify command parameter
if
then
echo 'Incorrect command parameter'
echo... (3 Replies)
PG_TEST_FSYNC(1) PostgreSQL 9.2.7 Documentation PG_TEST_FSYNC(1)NAME
pg_test_fsync - determine fastest wal_sync_method for PostgreSQL
SYNOPSIS
pg_test_fsync [option...]
DESCRIPTION
pg_test_fsync is intended to give you a reasonable idea of what the fastest wal_sync_method is on your specific system, as well as
supplying diagnostic information in the event of an identified I/O problem. However, differences shown by pg_test_fsync might not make any
difference in real database throughput, especially since many database servers are not speed-limited by their transaction logs.
OPTIONS
pg_test_fsync accepts the following command-line options:
-f, --filename
Specifies the file name to write test data in. This file should be in the same file system that the pg_xlog directory is or will be
placed in. (pg_xlog contains the WAL files.) The default is pg_test_fsync.out in the current directory.
-s, --secs-per-test
Specifies the number of seconds for each test. The more time per test, the greater the test's accuracy, but the longer it takes to run.
The default is 2 seconds, which allows the program to complete in about 30 seconds.
-V, --version
Print the pg_test_fsync version and exit.
-?, --help
Show help about pg_test_fsync command line arguments, and exit.
AUTHOR
Bruce Momjian <bruce@momjian.us>
SEE ALSO postgres(1)PostgreSQL 9.2.7 2014-02-17 PG_TEST_FSYNC(1)