20090428
http://www.pantz.org/software/mysql/mysqlcommands.html
Posted on 07-25-2007 00:13:00 UTC | Updated on 01-23-2009 16:29:23 UTC
Section: /software/mysql/ | Permanent Link
This is a list of handy MySQL commands that I use time and time again. At the bottom are statements, clauses, and functions you can use in MySQL. Below that are PHP and Perl API functions you can use to interface with MySQL. To use those you will need to build PHP with MySQL functionality. To use MySQL with Perl you will need to use the Perl modules DBI and DBD::mysql.
Below when you see # it means from the unix shell. When you see mysql> it means from a MySQL prompt after logging into MySQL.
To login (from unix shell) use -h only if needed.
# [mysql dir]/bin/mysql -h hostname -u root -p
Create a database on the sql server.
mysql> create database [databasename];
List all databases on the sql server.
mysql> show databases;
Switch to a database.
mysql> use [db name];
To see all the tables in the db.
mysql> show tables;
To see database's field formats.
mysql> describe [table name];
To delete a db.
mysql> drop database [database name];
To delete a table.
mysql> drop table [table name];
Show all data in a table.
mysql> SELECT * FROM [table name];
Returns the columns and column information pertaining to the designated table.
mysql> show columns from [table name];
Show certain selected rows with the value "whatever".
mysql> SELECT * FROM [table name] WHERE [field name] = "whatever";
Show all records containing the name "Bob" AND the phone number '3444444'.
mysql> SELECT * FROM [table name] WHERE name = "Bob" AND phone_number = '3444444';
Show all records not containing the name "Bob" AND the phone number '3444444' order by the phone_number field.
mysql> SELECT * FROM [table name] WHERE name != "Bob" AND phone_number = '3444444' order by phone_number;
Show all records starting with the letters 'bob' AND the phone number '3444444'.
mysql> SELECT * FROM [table name] WHERE name like "Bob%" AND phone_number = '3444444';
Show all records starting with the letters 'bob' AND the phone number '3444444' limit to records 1 through 5.
mysql> SELECT * FROM [table name] WHERE name like "Bob%" AND phone_number = '3444444' limit 1,5;
Use a regular expression to find records. Use "REGEXP BINARY" to force case-sensitivity. This finds any record beginning with a.
mysql> SELECT * FROM [table name] WHERE rec RLIKE "^a";
Show unique records.
mysql> SELECT DISTINCT [column name] FROM [table name];
Show selected records sorted in an ascending (asc) or descending (desc).
mysql> SELECT [col1],[col2] FROM [table name] ORDER BY [col2] DESC;
Return number of rows.
mysql> SELECT COUNT(*) FROM [table name];
Sum column.
mysql> SELECT SUM(*) FROM [table name];
Join tables on common columns.
mysql> select lookup.illustrationid, lookup.personid,person.birthday from lookup left join person on lookup.personid=person.personid=statement to join birthday in person table with primary illustration id;
Creating a new user. Login as root. Switch to the MySQL db. Make the user. Update privs.
# mysql -u root -p
mysql> use mysql;
mysql> INSERT INTO user (Host,User,Password) VALUES('%','username',PASSWORD('password'));
mysql> flush privileges;
Change a users password from unix shell.
# [mysql dir]/bin/mysqladmin -u username -h hostname.blah.org -p password 'new-password'
Change a users password from MySQL prompt. Login as root. Set the password. Update privs.
# mysql -u root -p
mysql> SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere');
mysql> flush privileges;
Recover a MySQL root password. Stop the MySQL server process. Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server.
# /etc/init.d/mysql stop
# mysqld_safe --skip-grant-tables &
# mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("newrootpassword") where User='root';
mysql> flush privileges;
mysql> quit
# /etc/init.d/mysql stop
# /etc/init.d/mysql start
Set a root password if there is on root password.
# mysqladmin -u root password newpassword
Update a root password.
# mysqladmin -u root -p oldpassword newpassword
Allow the user "bob" to connect to the server from localhost using the password "passwd". Login as root. Switch to the MySQL db. Give privs. Update privs.
# mysql -u root -p
mysql> use mysql;
mysql> grant usage on *.* to bob@localhost identified by 'passwd';
mysql> flush privileges;
Give user privilages for a db. Login as root. Switch to the MySQL db. Grant privs. Update privs.
# mysql -u root -p
mysql> use mysql;
mysql> INSERT INTO user (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv) VALUES ('%','databasename','username','Y','Y','Y','Y','Y','N');
mysql> flush privileges;
or
mysql> grant all privileges on databasename.* to username@localhost;
mysql> flush privileges;
To update info already in a table.
mysql> UPDATE [table name] SET Select_priv = 'Y',Insert_priv = 'Y',Update_priv = 'Y' where [field name] = 'user';
Delete a row(s) from a table.
mysql> DELETE from [table name] where [field name] = 'whatever';
Update database permissions/privilages.
mysql> flush privileges;
Delete a column.
mysql> alter table [table name] drop column [column name];
Add a new column to db.
mysql> alter table [table name] add column [new column name] varchar (20);
Change column name.
mysql> alter table [table name] change [old column name] [new column name] varchar (50);
Make a unique column so you get no dupes.
mysql> alter table [table name] add unique ([column name]);
Make a column bigger.
mysql> alter table [table name] modify [column name] VARCHAR(3);
Delete unique from table.
mysql> alter table [table name] drop index [colmn name];
Load a CSV file into a table.
mysql> LOAD DATA INFILE '/tmp/filename.csv' replace INTO TABLE [table name] FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,field3);
Dump all databases for backup. Backup file is sql commands to recreate all db's.
# [mysql dir]/bin/mysqldump -u root -ppassword --opt >/tmp/alldatabases.sql
Dump one database for backup.
# [mysql dir]/bin/mysqldump -u username -ppassword --databases databasename >/tmp/databasename.sql
Dump a table from a database.
# [mysql dir]/bin/mysqldump -c -u username -ppassword databasename tablename > /tmp/databasename.tablename.sql
Restore database (or database table) from backup.
# [mysql dir]/bin/mysql -u username -ppassword databasename < /tmp/databasename.sql
Create Table Example 1.
mysql> CREATE TABLE [table name] (firstname VARCHAR(20), middleinitial VARCHAR(3), lastname VARCHAR(35),suffix VARCHAR(3),officeid VARCHAR(10),userid VARCHAR(15),username VARCHAR(8),email VARCHAR(35),phone VARCHAR(25), groups VARCHAR(15),datestamp DATE,timestamp time,pgpemail VARCHAR(255));
Create Table Example 2.
mysql> create table [table name] (personid int(50) not null auto_increment primary key,firstname varchar(35),middlename varchar(50),lastnamevarchar(50) default 'bato');
MYSQL Statements and clauses
ALTER DATABASE
ALTER TABLE
ALTER VIEW
ANALYZE TABLE
BACKUP TABLE
CACHE INDEX
CHANGE MASTER TO
CHECK TABLE
CHECKSUM TABLE
COMMIT
CREATE DATABASE
CREATE INDEX
CREATE TABLE
CREATE VIEW
DELETE
DESCRIBE
DO
DROP DATABASE
DROP INDEX
DROP TABLE
DROP USER
DROP VIEW
EXPLAIN
FLUSH
GRANT
HANDLER
INSERT
JOIN
KILL
LOAD DATA FROM MASTER
LOAD DATA INFILE
LOAD INDEX INTO CACHE
LOAD TABLE...FROM MASTER
LOCK TABLES
OPTIMIZE TABLE
PURGE MASTER LOGS
RENAME TABLE
REPAIR TABLE
REPLACE
RESET
RESET MASTER
RESET SLAVE
RESTORE TABLE
REVOKE
ROLLBACK
ROLLBACK TO SAVEPOINT
SAVEPOINT
SELECT
SET
SET PASSWORD
SET SQL_LOG_BIN
SET TRANSACTION
SHOW BINLOG EVENTS
SHOW CHARACTER SET
SHOW COLLATION
SHOW COLUMNS
SHOW CREATE DATABASE
SHOW CREATE TABLE
SHOW CREATE VIEW
SHOW DATABASES
SHOW ENGINES
SHOW ERRORS
SHOW GRANTS
SHOW INDEX
SHOW INNODB STATUS
SHOW LOGS
SHOW MASTER LOGS
SHOW MASTER STATUS
SHOW PRIVILEGES
SHOW PROCESSLIST
SHOW SLAVE HOSTS
SHOW SLAVE STATUS
SHOW STATUS
SHOW TABLE STATUS
SHOW TABLES
SHOW VARIABLES
SHOW WARNINGS
START SLAVE
START TRANSACTION
STOP SLAVE
TRUNCATE TABLE
UNION
UNLOCK TABLES
USE
String Functions
AES_DECRYPT
AES_ENCRYPT
ASCII
BIN
BINARY
BIT_LENGTH
CHAR
CHAR_LENGTH
CHARACTER_LENGTH
COMPRESS
CONCAT
CONCAT_WS
CONV
DECODE
DES_DECRYPT
DES_ENCRYPT
ELT
ENCODE
ENCRYPT
EXPORT_SET
FIELD
FIND_IN_SET
HEX
INET_ATON
INET_NTOA
INSERT
INSTR
LCASE
LEFT
LENGTH
LOAD_FILE
LOCATE
LOWER
LPAD
LTRIM
MAKE_SET
MATCH AGAINST
MD5
MID
OCT
OCTET_LENGTH
OLD_PASSWORD
ORD
PASSWORD
POSITION
QUOTE
REPEAT
REPLACE
REVERSE
RIGHT
RPAD
RTRIM
SHA
SHA1
SOUNDEX
SPACE
STRCMP
SUBSTRING
SUBSTRING_INDEX
TRIM
UCASE
UNCOMPRESS
UNCOMPRESSED_LENGTH
UNHEX
UPPER
Date and Time Functions
ADDDATE
ADDTIME
CONVERT_TZ
CURDATE
CURRENT_DATE
CURRENT_TIME
CURRENT_TIMESTAMP
CURTIME
DATE
DATE_ADD
DATE_FORMAT
DATE_SUB
DATEDIFF
DAY
DAYNAME
DAYOFMONTH
DAYOFWEEK
DAYOFYEAR
EXTRACT
FROM_DAYS
FROM_UNIXTIME
GET_FORMAT
HOUR
LAST_DAY
LOCALTIME
LOCALTIMESTAMP
MAKEDATE
MAKETIME
MICROSECOND
MINUTE
MONTH
MONTHNAME
NOW
PERIOD_ADD
PERIOD_DIFF
QUARTER
SEC_TO_TIME
SECOND
STR_TO_DATE
SUBDATE
SUBTIME
SYSDATE
TIME
TIMEDIFF
TIMESTAMP
TIMESTAMPDIFF
TIMESTAMPADD
TIME_FORMAT
TIME_TO_SEC
TO_DAYS
UNIX_TIMESTAMP
UTC_DATE
UTC_TIME
UTC_TIMESTAMP
WEEK
WEEKDAY
WEEKOFYEAR
YEAR
YEARWEEK
Mathematical and Aggregate Functions
ABS
ACOS
ASIN
ATAN
ATAN2
AVG
BIT_AND
BIT_OR
BIT_XOR
CEIL
CEILING
COS
COT
COUNT
CRC32
DEGREES
EXP
FLOOR
FORMAT
GREATEST
GROUP_CONCAT
LEAST
LN
LOG
LOG2
LOG10
MAX
MIN
MOD
PI
POW
POWER
RADIANS
RAND
ROUND
SIGN
SIN
SQRT
STD
STDDEV
SUM
TAN
TRUNCATE
VARIANCE
Flow Control Functions
CASE
IF
IFNULL
NULLIF
Command-Line Utilities
comp_err
isamchk
make_binary_distribution
msql2mysql
my_print_defaults
myisamchk
myisamlog
myisampack
mysqlaccess
mysqladmin
mysqlbinlog
mysqlbug
mysqlcheck
mysqldump
mysqldumpslow
mysqlhotcopy
mysqlimport
mysqlshow
perror
Perl API - using functions and methods built into the Perl DBI with MySQL
available_drivers
begin_work
bind_col
bind_columns
bind_param
bind_param_array
bind_param_inout
can
clone
column_info
commit
connect
connect_cached
data_sources
disconnect
do
dump_results
err
errstr
execute
execute_array
execute_for_fetch
fetch
fetchall_arrayref
fetchall_hashref
fetchrow_array
fetchrow_arrayref
fetchrow_hashref
finish
foreign_key_info
func
get_info
installed_versions
last_insert_id
looks_like_number
neat
neat_list
parse_dsn
parse_trace_flag
parse_trace_flags
ping
prepare
prepare_cached
primary_key
primary_key_info
quote
quote_identifier
rollback
rows
selectall_arrayref
selectall_hashref
selectcol_arrayref
selectrow_array
selectrow_arrayref
selectrow_hashref
set_err
state
table_info
table_info_all
tables
trace
trace_msg
type_info
type_info_all
Attributes for Handles
PHP API - using functions built into PHP with MySQL
mysql_affected_rows
mysql_change_user
mysql_client_encoding
mysql_close
mysql_connect
mysql_create_db
mysql_data_seek
mysql_db_name
mysql_db_query
mysql_drop_db
mysql_errno
mysql_error
mysql_escape_string
mysql_fetch_array
mysql_fetch_assoc
mysql_fetch_field
mysql_fetch_lengths
mysql_fetch_object
mysql_fetch_row
mysql_field_flags
mysql_field_len
mysql_field_name
mysql_field_seek
mysql_field_table
mysql_field_type
mysql_free_result
mysql_get_client_info
mysql_get_host_info
mysql_get_proto_info
mysql_get_server_info
mysql_info
mysql_insert_id
mysql_list_dbs
mysql_list_fields
mysql_list_processes
mysql_list_tables
mysql_num_fields
mysql_num_rows
mysql_pconnect
mysql_ping
mysql_query
mysql_real_escape_string
mysql_result
mysql_select_db
mysql_stat
mysql_tablename
mysql_thread_id
mysql_unbuffered_query
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
20090427
20090420
ഹോന്ഗ് കൊണ്ഗ് സ്ക്യ്ലിനെ
20090416
custombemerkung
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
20090414
sfc /scannow reset sourcepath location to take account of \i386
<br><strong>#1 </strong><br><br>Has the CD Drive's drive letter changed (perhaps by the addition of another hard drive, partition, or removable drive) since Windows XP was first installed? If so, simply edit the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\<br>CurrentVersion\Setup\SourcePath to reflect the changed drive letter. <br><br>After you restart the computer, WFP and sfc /scannow uses the new source path instead of prompting for the Windows XP installation CD-ROM<br><br><strong>#2</strong> <br><br>Has the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\<br>CurrentVersion\Setup\SourcePath got an incorrect entry? The SourcePath entry does NOT include the path location till the I386 folder. It completes one folder ahead to reach the I386 folder. <br><br>Example:<br><br>If the I386 directory is at C:\I386, the SourcePath value would be C:\<br><br><strong>#3</strong><br><br>If the problem persists and you have the correct path for your I386 folder then the I386 folder is corrupted. To solve this problem copy I386 folder from the CD-ROM to your system restart the system and then<br>perform sfc /scannow again.<br>
20090412
20090409
Hypertext Transfer Protocol -- HTTP/1.൧ RFC 2616 Fielding, et al. ര്ത്ഫം ര്ട്ര്ഫ്ക് വുല്ലത് 10 Status Code ടെഫിനിറേന്സ്(abridged ;)
10 Status Code Definitions
10.1 Informational 1xx
10.1.1 100 Continue
10.1.2 101 Switching Protocols
10.2 Successful 2xx
10.2.1 200 OK
10.2.2 201 Created
10.2.3 202 Accepted
10.2.4 203 Non-Authoritative Information
10.2.5 204 No Content
10.2.6 205 Reset Content
10.2.7 206 Partial Content
10.3 Redirection 3xx
10.3.1 300 Multiple Choices
10.3.2 301 Moved Permanently
10.3.3 302 Found
10.3.4 303 See Other
10.3.5 304 Not Modified
10.3.6 305 Use Proxy
10.3.7 306 (Unused)
10.3.8 307 Temporary Redirect
10.4 Client Error 4xx
10.4.1 400 Bad Request
10.4.2 401 Unauthorized
10.4.3 402 Payment Required ( This code is reserved for future use. )
10.4.4 403 Forbidden
10.4.5 404 Not Found
10.4.6 405 Method Not Allowed
10.4.7 406 Not Acceptable
10.4.8 407 Proxy Authentication Required
10.4.9 408 Request Timeout
10.4.10 409 Conflict
10.4.11 410 Gone
10.4.12 411 Length Required
10.4.13 412 Precondition Failed
10.4.14 413 Request Entity Too Large
10.4.15 414 Request-URI Too Long
10.4.16 415 Unsupported Media Type
10.4.17 416 Requested Range Not Satisfiable
10.4.18 417 Expectation Failed
10.5 Server Error 5xx
10.5.1 500 Internal Server Error
10.5.2 501 Not Implemented
10.5.3 502 Bad Gateway
10.5.4 503 Service Unavailable
10.5.5 504 Gateway Timeout
10.5.6 505 HTTP Version Not Supported
3.1 HTTP Version
HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
Note that the major and minor numbers MUST be treated as separate integers and that each MAY be incremented higher than a single digit. Thus, HTTP/2.4 < HTTP/2.13 < HTTP/12.3. Leading zeros MUST be ignored by recipients and MUST NOT be sent.
Applications SHOULD use an HTTP-Version of "HTTP/1.1" in their messages, and MUST do so for any message that is not compatible with HTTP/1.0. (when to send HTTP-Version: see RFC 2145 [36].)
3.2 Uniform Resource Identifiers
WWW addresses, Universal Document Identifiers, Universal Resource Identifiers, Uniform Resource Locators (URL) and Names (URN).
3.2.1 General Syntax
URIs in HTTP can be represented in absolute form or relative to some known base URI. Absolute URIs always begin with a scheme name followed by a colon. (see RFC 2396 "(URI): Generic Syntax and Semantics." This specification adopts the definitions of "URI-reference", "absoluteURI", "relativeURI", "port", "host","abs_path", "rel_path", and "authority" from that specification.
Servers MUST be able to handle the URI of any resource they serve, and SHOULD be able to handle URIs of unbounded length if they provide GET-based forms that could generate such URIs. A server SHOULD return 414 (Request-URI Too Long) status if a URI is longer than the server can handle (see section 10.4.15).
Note: Servers ought to be cautious about depending on URI lengths
above 255 bytes, because some older client or proxy
implementations might not properly support these lengths.
3.2.2 http URL
The "http" scheme is used to locate network resources via the HTTP protocol. This section defines the scheme-specific syntax and semantics for http URLs.
http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]]
If the port is empty or not given, port 80 is assumed. The use of IP addresses in URLs SHOULD be avoided whenever possible (see RFC 1900). If a proxy receives a host name which is not a fully qualified domain name, it MAY add its domain to the host name it received. If a proxy receives a fully qualified domain name, the proxy MUST NOT change the host name.
3.2.3 URI Comparison
When comparing two URIs to decide if they match or not, a client SHOULD use a case-sensitive octet-by-octet comparison of the entire URIs, with these exceptions:
- A port that is empty or not given is equivalent to the default
port for that URI-reference;
- Comparisons of host names MUST be case-insensitive;
- Comparisons of scheme names MUST be case-insensitive;
- An empty abs_path is equivalent to an abs_path of "/".
Characters other than those in the "reserved" and "unsafe" sets (see RFC 2396) are equivalent to their ""%" HEX HEX" encoding.
http://abc.com:80/~smith/home.html == http://ABC.com/%7Esmith/home.html == http://ABC.com:/%7esmith/home.html
3.3 Date/Time Formats
Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception.
3.3.2 Delta Seconds
Some HTTP header fields allow a time value to be specified as an integer number of seconds, represented in decimal, after the time that the message was received.
delta-seconds = 1*DIGIT
3.4 Character Sets
HTTP uses the same definition of the term "character set" as that described for MIME:
10.3.3 302 Found
The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.
The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).
If the 302 status code is received in response to a request other than GET or HEAD, the user agent MUST NOT automatically redirect the request unless it can be confirmed by the user, since this might change the conditions under which the request was issued.
Note: RFC 1945 and RFC 2068 specify that the client is not allowed
to change the method on the redirected request. However, most
existing user agent implementations treat 302 as if it were a 303
response, performing a GET on the Location field-value regardless
of the original request method. The status codes 303 and 307 have
been added for servers that wish to make unambiguously clear which
kind of reaction is expected of the client.
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
20090408
ലെക്കെര് വിജ്ഫ് അന്ടെര്സ് ;)klekker wijf anders ;)
08-Mar-2009 06:17
Found this script after much despair, should be useful to lot of people.
To submit a form using POST method through PHP, just add the data to be posted as header. This essentially saves one extra html page sent to the browser when user has to be redirected. Mostly found this technique useful for redirecting to payment gateways.
$host = "www.example.com";
$path = "/path/to/script.php";
$data = "data1=value1&data2=value2";
$data = urlencode($data);
header("POST $path HTTP/1.1\r\n" );
header("Host: $host\r\n" );
header("Content-type: application/x-www-form-urlencoded\r\n" );
header("Content-length: " . strlen($data) . "\r\n" );
header("Connection: close\r\n\r\n" );
header($data);
?>
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
#!/bin/sh
#remove the line below the config (marked remove) after editing to make it work ;)
#set -o xtrace
CURDIR="$(pwd)"
FROMDIR="/Users/drkrimson/Work/inhouse/tantekaat"
TODIR="/Users/drkrimson/Sites/kaat.tys/"
SVNLOC="file:///Users/drkrimson/Documents/SVNRoot/trunk/inhouse/tantekaat/WebRoot"
TONEWDIR="public_html"
COMMITMSG="exporting ${FROMDIR} to ${TODIR} on ${TODAY}"
# remove
exit
cd "$FROMDIR"
svn add *{,/*{,/*{,/*{,/*}}}} 2>/dev/null
CMTEST="$(svn commit -m "${COMMITMSG}" | grep -i revision 2>&1)"
if [[ -n "$CMTEST" ]]; then
echo "$CMTEST"
cd "$TODIR"
rm -rf "${TONEWDIR}_previous"
mv -f "$TONEWDIR" "${TONEWDIR}_previous"
SVNE=$(svn export --force "${SVNLOC}" "${TONEWDIR}" | grep -i revision 2>&1)
echo "$SVNE"
else
echo "Couldn't commit!"
echo "$CMTEST"
fi
if [[ -f ${CURDIR}${0}.after.sh ]]; then
${CURDIR}${0}.after.sh
fi
cd $CURDIR
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
20090407
mssql kinky inner join
GO
SELECT DISTINCT p.ProductID, p.Name, p.ListPrice, sd.UnitPrice AS 'Selling Price'
FROM Sales.SalesOrderDetail AS sd
JOIN Production.Product AS p
ON sd.ProductID = p.ProductID AND sd.UnitPrice < p.ListPrice
WHERE p.ProductID = 718;
GO
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
toplinks
പ്രോടോടിപേ ബഗ്
September 5th, 2008 @ 08:36 PM
Okay, I have a patch that seems to work. I don't entirely understand what I'm doing, so use with caution. And sorry I don't have a clean prototype to actually make a real patch (or know how to, for that matter).
But in Prototype 1.6.0.2, there is a wrapper for viewportOffset for IE, that has a bug in it.
Look for the line:
var offsetParent = element.getOffsetParent();
Change to:
var offsetParent = (element.parent) ? element.getOffsetParent() : 0;
Seems to do the trick for me.
Seems like it's actually a prototype bug, not a scriptaculous one? But not really sure.
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
20090401
സുര്രെന്സി symbols
# ISO 4217 and common world currency symbols
#===========================================================================
# code => 0 1 2 3 4 5 6 7 8
# name frac_len thou_sep dec_sep space_sep utf_sym htm_sym com_sym pre
%currency = (
AED => ["UAE Dirham",2,",","."," ",$EMPTY,$EMPTY,"Dhs.",1],
AFA => ["Afghani",0,$EMPTY,$EMPTY,"\x{060B}","<B;",,$EMPTY,$EMPTY],
ALL => ["Lek",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
AMD => ["Armenian Dram",2,",",".","",$EMPTY,$EMPTY,"AMD",0],
ANG => ["Antillian Guilder",2,".",","," ","\x{0192}","ƒ","NAf.",1],
AON => ["New Kwanza",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
ARS => ["Argentine Peso",2,".",",","","\x{20B1}","₱","\$",1],
ATS => ["Schilling",2,".",","," ",$EMPTY,$EMPTY,"öS",1],
AUD => ["Australian Dollar",2," ",".","","\x{0024}","$","\$",1],
AWG => ["Aruban Guilder",2,",","."," ","\x{0192}","ƒ","AWG",1],
AZN => ["Azerbaijanian Manat",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,"m",$EMPTY],
BAM => ["Convertible Marks",2,",",".","",$EMPTY,$EMPTY,"AZM",0],
BBD => ["Barbados Dollar",2,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY],
BDT => ["Taka",2,",","."," ",$EMPTY,$EMPTY,"Bt.",1],
BEF => ["Belgian Franc",0,".",""," ","\x{20A3}","₣","BEF",1],
BGL => ["Lev",2," ",","," ",$EMPTY,$EMPTY,"lv",0],
BHD => ["Bahraini Dinar",3,",","."," ",$EMPTY,$EMPTY,"BD",1],
BIF => ["Burundi Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
BMD => ["Bermudian Dollar",2,",",".","","\x{0024}","$","\$",1],
BND => ["Brunei Dollar",2,",",".","","\x{0024}","$","\$",1],
BOB => ["Bolivian Boliviano",2,",",".","",$EMPTY,$EMPTY,"Bs",1],
BRL => ["Brazilian Real",2,".",","," ","\x{0052}\x{0024}","R\$","R\$",1],
BSD => ["Bahamian Dollar",2,",",".","","\x{0024}","$","\$",1],
BTN => ["Bhutan Ngultrum",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
BWP => ["Pula",2,",",".","",$EMPTY,$EMPTY,"P",1],
BYR => ["Belarussian Ruble",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
BZD => ["Belize Dollar",2,",",".","","\x{0024}","$","\$",1],
CAD => ["Canadian Dollar",2,",",".","","\x{0024}","$","\$",1],
CDF => ["Franc Congolais",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
CHF => ["Swiss Franc",2,"'","."," ",$EMPTY,$EMPTY,"SFr.",1],
CLP => ["Chilean Peso",0,".","","","\x{20B1}","₱","\$",1],
CNY => ["Yuan Renminbi",2,",",".","","\x{5713}","圓","Y",1],
COP => ["Colombian Peso",2,".",",","","\x{20B1}","₱","\$",1],
CRC => ["Costa Rican Colon",2,".",","," ","\x{20A1}","₡","\x{20A1}",1],
CUP => ["Cuban Peso",2,",","."," ","\x{20B1}","₱","\$",1],
CVE => ["Cape Verde Escudo",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
CYP => ["Cyprus Pound",2,".",",","","\x{00A3}","£","\x{00A3}",1],
CZK => ["Czech Koruna",2,".",","," ",$EMPTY,$EMPTY,"Kc",0],
DEM => ["Deutsche Mark",2,".",",","",$EMPTY,$EMPTY,"DM",0],
DJF => ["Djibouti Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
DKK => ["Danish Krone",2,".",",","",$EMPTY,$EMPTY,"kr.",1],
DOP => ["Dominican Peso",2,",","."," ","\x{20B1}","₱","\$",1],
DZD => ["Algerian Dinar",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
ECS => ["Sucre",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
EEK => ["Kroon",2," ",","," ",$EMPTY,$EMPTY,"EEK",0],
EGP => ["Egyptian Pound",2,",","."," ","\x{00A3}","£","L.E.",1],
ERN => ["Nakfa",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
ESP => ["Spanish Peseta",0,".",""," ","\x{20A7}","₧","Ptas",0],
ETB => ["Ethiopian Birr",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
EUR => ["Euro",2,".",",","","\x{20AC}","€","EUR",1],
FIM => ["Markka",2," ",","," ",$EMPTY,$EMPTY,"mk",0],
FJD => ["Fiji Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY],
FKP => ["Pound",0,$EMPTY,$EMPTY,"","\x{00A3}","£",$EMPTY,$EMPTY],
FRF => ["French Franc",2," ",","," ","\x{20A3}","₣","FRF",0],
GBP => ["Pound Sterling",2,",",".","","\x{00A3}","£","£",1],
GEL => ["Lari",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
GHS => ["Cedi",2,",",".","","\x{20B5}","B5;","\x{20B5}",1],
GIP => ["Gibraltar Pound",2,",",".","","\x{00A3}","£","£",1],
GMD => ["Dalasi",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
GNF => ["Guinea Franc",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY],
GRD => ["Drachma",2,".",","," ","\x{20AF}","₯","GRD",0],
GTQ => ["Quetzal",2,",",".","",$EMPTY,$EMPTY,"Q.",1],
GWP => ["Guinea-Bissau Peso",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY],
GYD => ["Guyana Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY],
HKD => ["Hong Kong Dollar",2,",",".","","\x{0024}","$","HK\$",1],
HNL => ["Lempira",2,",","."," ",$EMPTY,$EMPTY,"L",1],
HRK => ["Kuna",2,".",","," ",$EMPTY,$EMPTY,"kn",0],
HTG => ["Gourde",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
HUF => ["Forint",0,".",""," ",$EMPTY,$EMPTY,"Ft",0],
IDR => ["Rupiah",0,".","","",$EMPTY,$EMPTY,"Rp.",1],
IEP => ["Irish Pound",2,",",".","","\x{00A3}","£","£",1],
ILS => ["New Israeli Sheqel",2,",","."," ","\x{20AA}","₪","NIS",0],
INR => ["Indian Rupee",2,",",".","","\x{20A8}","₨","Rs.",1],
IQD => ["Iraqi Dinar",3,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
IRR => ["Iranian Rial",2,",","."," ","\x{FDFC}","﷼","Rls",1],
ISK => ["Iceland Krona",2,".",","," ",$EMPTY,$EMPTY,"kr",0],
ITL => ["Italian Lira",0,".",""," ","\x{20A4}","₤","L.",1],
JMD => ["Jamaican Dollar",2,",",".","","\x{0024}","$","\$",1],
JOD => ["Jordanian Dinar",3,",","."," ",$EMPTY,$EMPTY,"JD",1],
JPY => ["Yen",0,",","","","\x{00A5}","¥","¥",1],
KES => ["Kenyan Shilling",2,",",".","",$EMPTY,$EMPTY,"Kshs.",1],
KGS => ["Som",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
KHR => ["Riel",2,$EMPTY,$EMPTY,"","\x{17DB}","៛",$EMPTY,$EMPTY],
KMF => ["Comoro Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
KPW => ["North Korean Won",0,$EMPTY,$EMPTY,"","\x{20A9}","₩",$EMPTY,$EMPTY],
KRW => ["Won",0,",","","","\x{20A9}","₩","\\",1],
KWD => ["Kuwaiti Dinar",3,",","."," ",$EMPTY,$EMPTY,"KD",1],
KYD => ["Cayman Islands Dollar",2,",",".","","\x{0024}","$","\$",1],
KZT => ["Tenge",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
LAK => ["Kip",0,$EMPTY,$EMPTY,"","\x{20AD}","₭",$EMPTY,$EMPTY],
LBP => ["Lebanese Pound",0," ","","","\x{00A3}","£","L.L.",0],
LKR => ["Sri Lanka Rupee",0,$EMPTY,$EMPTY,"","\x{0BF9}","௹",$EMPTY,$EMPTY],
LRD => ["Liberian Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY],
LSL => ["Lesotho Maloti",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
LTL => ["Lithuanian Litas",2," ",","," ",$EMPTY,$EMPTY,"Lt",0],
LUF => ["Luxembourg Franc",0,"'",""," ","\x{20A3}","₣","F",0],
LVL => ["Latvian Lats",2,",","."," ",$EMPTY,$EMPTY,"Ls",1],
LYD => ["Libyan Dinar",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MAD => ["Moroccan Dirham",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MDL => ["Moldovan Leu",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MGF => ["Malagasy Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MKD => ["Denar",2,",","."," ",$EMPTY,$EMPTY,"MKD",0],
MMK => ["Kyat",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MNT => ["Tugrik",0,$EMPTY,$EMPTY,"","\x{20AE}","₮",$EMPTY,$EMPTY],
MOP => ["Pataca",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MRO => ["Ouguiya",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MTL => ["Maltese Lira",2,",",".","","\x{20A4}","₤","Lm",1],
MUR => ["Mauritius Rupee",0,",","","","\x{20A8}","₨","Rs",1],
MVR => ["Rufiyaa",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MWK => ["Kwacha",2,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
MXN => ["Mexican Peso",2,",","."," ","\x{0024}","$","\$",1],
MYR => ["Malaysian Ringgit",2,",",".","",$EMPTY,$EMPTY,"RM",1],
MZN => ["Metical",2,".",","," ",$EMPTY,$EMPTY,"Mt",0],
NAD => ["Namibian Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY],
NGN => ["Naira",0,$EMPTY,$EMPTY,"","\x{20A6}","₦",$EMPTY,$EMPTY],
NIO => ["Cordoba Oro",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
NLG => ["Netherlands Guilder",2,".",","," ","\x{0192}","ƒ","f",1],
NOK => ["Norwegian Krone",2,".",","," ","kr","kr","kr",1],
NPR => ["Nepalese Rupee",2,",","."," ","\x{20A8}","₨","Rs.",1],
NZD => ["New Zealand Dollar",2,",",".","","\x{0024}","$","\$",1],
OMR => ["Rial Omani",3,",","."," ","\x{FDFC}","﷼","RO",1],
PAB => ["Balboa",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
PEN => ["Nuevo Sol",2,",","."," ","S/.","S/.","S/.",1],
PGK => ["Kina",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
PHP => ["Philippine Peso",2,",",".","","\x{20B1}","₱","PHP",1],
PKR => ["Pakistan Rupee",2,",",".","","\x{20A8}","₨","Rs.",1],
PLN => ["Zloty",2," ",","," ",$EMPTY,$EMPTY,"zl",0],
PTE => ["Portuguese Escudo",0,".",""," ",$EMPTY,$EMPTY,"Esc",0],
PYG => ["Guarani",0,$EMPTY,$EMPTY,"","\x{20B2}","B2;","Gs.",$EMPTY],
QAR => ["Qatari Rial",0,$EMPTY,$EMPTY,"","\x{FDFC}","﷼",$EMPTY,$EMPTY],
RON => ["Leu",2,".",","," ",$EMPTY,$EMPTY,"lei",0],
RSD => ["Serbian Dinar",2,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,"din",0],
RUB => ["Russian Ruble",2,".",",",$EMPTY,"\x{0440}\x{0443}\x{0431}","ƸƻƯ","RUB",1],
RWF => ["Rwanda Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
SAC => ["S. African Rand Commerc.",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
SAR => ["Saudi Riyal",2,",","."," ","\x{FDFC}","﷼","SR",1],
SBD => ["Solomon Islands Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY],
SCR => ["Seychelles Rupee",0,$EMPTY,$EMPTY,"","\x{20A8}","₨",$EMPTY,$EMPTY],
SDG => ["Sudanese Dinar",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,"LSd",$EMPTY],
SDP => ["Sudanese Pound",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
SEK => ["Swedish Krona",2," ",","," ",$EMPTY,$EMPTY,"kr",0],
SGD => ["Singapore Dollar",2,",",".","","\x{0024}","$","\$",1],
SHP => ["St Helena Pound",0,$EMPTY,$EMPTY,"","\x{00A3}","£",$EMPTY,$EMPTY],
SIT => ["Tolar",2,".",","," ",$EMPTY,$EMPTY,"SIT",0],
SKK => ["Slovak Koruna",2," ",","," ",$EMPTY,$EMPTY,"Sk",0],
SLL => ["Leone",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
SOS => ["Somali Shilling",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
SRG => ["Surinam Guilder",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
STD => ["Dobra",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
SVC => ["El Salvador Colon",2,",",".","","\x{20A1}","₡","\x{20A1}",1],
SYP => ["Syrian Pound",0,$EMPTY,$EMPTY,"","\x{00A3}","£",$EMPTY,$EMPTY],
SZL => ["Lilangeni",2,"",".","",$EMPTY,$EMPTY,"E",1],
THB => ["Baht",2,",","."," ","\x{0E3F}","฿","Bt",0],
TJR => ["Tajik Ruble",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
TJS => ["Somoni",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY],
TMM => ["Manat",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
TND => ["Tunisian Dinar",3,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
TOP => ["Pa'anga",2,",","."," ",$EMPTY,$EMPTY,"\$",1],
TPE => ["Timor Escudo",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY],
TRL => ["Turkish Lira",0,",","","","\x{20A4}","₤","TL",0],
TTD => ["Trinidad and Tobago Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY],
TWD => ["New Taiwan Dollar",0,$EMPTY,$EMPTY,"","\x{0024}","$",$EMPTY,$EMPTY],
TZS => ["Tanzanian Shilling",2,",","."," ",$EMPTY,$EMPTY,"TZs",0],
UAH => ["Hryvnia",2," ",",","","\x{20B4}","₴",$EMPTY,0],
UGX => ["Uganda Shilling",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
USD => ["US Dollar",2,",",".","","\x{0024}","$","\$",1],
UYU => ["Peso Uruguayo",2,".",",","","\x{20B1}","₱","\$",1],
UZS => ["Uzbekistan Sum",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
VEF => ["Bolivar",2,".",","," ",$EMPTY,$EMPTY,"Bs.F",1],
VND => ["Dong",2,".",","," ","\x{20AB}","₫","Dong",0],
VUV => ["Vatu",0,",","","",$EMPTY,$EMPTY,"VT",0],
WST => ["Tala",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
XAF => ["CFA Franc BEAC",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
XCD => ["East Caribbean Dollar",2,",",".","","\x{0024}","$","\$",1],
XOF => ["CFA Franc BCEAO",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY],
XPF => ["CFP Franc",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
YER => ["Yemeni Rial",0,$EMPTY,$EMPTY,"","\x{FDFC}","﷼",$EMPTY,$EMPTY],
YUN => ["New Dinar",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
ZAR => ["Rand",2," ","."," ","\x{0052}","R","R",1],
ZMK => ["Kwacha",0,$EMPTY,$EMPTY,"",$EMPTY,$EMPTY,$EMPTY,$EMPTY],
ZRN => ["New Zaire",$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY,$EMPTY],
ZWD => ["Zimbabwe Dollar ",2," ",".","","\x{0024}","$","Z\$",1],
);
1;
__END__
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
20090330
medisch paspoort
op doktersadvies
സ്ക്യ്പേ ചട്ബോറ്റ് (സ്ടുപിദ്)
20090329
20090326
64 bit
osx config stubs
X-Bender:jpeg-6b drkrimson$ cp /usr/share/libtool/config.
config.guess config.sub
X-Bender:jpeg-6b drkrimson$ cp /usr/share/libtool/config.* .X-Bender:jpeg-6b drkrimson$ ./configure --enable-shared
20090325
<span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">[[</span> <span class="global" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 139, 17); ">${</span><span class="constant" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 119, 255); ">BASH_VERSINFO</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">[</span><span class="number" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 153, 153); ">0</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">]}</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">-</span><span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">le</span> <span class="number" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 153, 153); ">2</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">]]</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">&&</span> <span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">echo</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">'</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">The BASH_SOURCE array variable is only available for Bash 3.0 and higher!</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">'</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">&&</span> <span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">exit</span> <span class="number" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 153, 153); ">1</span>
<span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">[[</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">${BASH_SOURCE[0]}</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">!=</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">${0}</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">]]</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">&&</span> <span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">echo</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">script ${BASH_SOURCE[0]} is running sourced ...</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span>
<span class="comment" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 85); font-style: italic; "># cf. Bash get self directory trick,</span>
<span class="comment" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 85); font-style: italic; "># http://stevemorin.blogspot.com/2007/10/bash-get-self-directory-trick.html</span>
<span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">script_path</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">="</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">$(cd $(/usr/bin/dirname </span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="global" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 139, 17); ">${</span><span class="constant" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 119, 255); ">BASH_SOURCE</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">[</span><span class="number" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 153, 153); ">0</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">]}"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">); pwd -P)/$(/usr/bin/basename </span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="global" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 139, 17); ">${</span><span class="constant" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 119, 255); ">BASH_SOURCE</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">[</span><span class="number" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 153, 153); ">0</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">]}"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">)</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span>
<span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">[[</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">!</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">-</span><span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">f</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">$script_path</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">]]</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">&&</span> <span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">script_path</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">="</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">$(cd $(/usr/bin/dirname </span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="global" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 139, 17); ">$0</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">); pwd -P)/$(/usr/bin/basename </span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="global" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 139, 17); ">$0</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">)</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span>
<span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">[[</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">!</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">-</span><span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">f</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">$script_path</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">]]</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">&&</span> <span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">script_path</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">="</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; "></span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">&&</span> <span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">echo</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">'</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">No full path to running script found!</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">'</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">&&</span> <span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">exit</span> <span class="number" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 153, 153); ">1</span>
<span class="comment" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 85); font-style: italic; "># full path to executing script's directory</span>
<span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">script_dir</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">="</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">${script_path%/*}</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span>
<span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">echo</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">script_dir: ${script_dir}</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span>
<span class="comment" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 85); font-style: italic; "># full path to executing script</span>
<span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">echo</span> <span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span><span class="string" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(153, 68, 68); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: rgb(255, 255, 238); background-position: initial initial; ">script_path: ${script_path}</span><span class="punct" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(68, 68, 119); font-weight: bold; ">"</span>
<span class="ident" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(0, 0, 68); ">exit</span> <span class="number" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(255, 153, 153); ">0</span></pre>
joining a Leopard Machine to an active directory domain.
1. Rename the AD domain to something else instead of .local
(.internal, or .edu, or .net or .org). If
2. Stop the daemon Bonjour from running on OSX Leopard. You can do
this with an application called iServeBox, which is a free open source
utility to manage daemons in OSX. You can get the application from
here: http://www.hanynet.com/iservebox/index.html
I turned off the Bonjour daemon. Then i proceeded with the following
steps to add the imac to the domain:
1. Go to the Directory Utility ‐> /Applications/Utilities/
2. Click the Advanced Settings Button ‐> Buttons should appear on the top
3. Click Services
4. Make sure you're authenticated to makes changes ‐> click the lock and login
5. Double‐click the Active Directory
6. type in your domain in "Active Directory Domain" ‐> ex.
(mydomain.com) watch out if your domain ends with .local opposed to
.com or .net, you need to disable bonjour if it ends with .local.
7. click bind
8. enter in username and password ‐> just the username NOT
email@hidden or MYDOMAIN\User
9. Click ok.
ESC[=h or 0 for 40 x 25 black & white
ESC[=0h or 1 for 40 x 25 color
ESC[?7h 2 for 80 x 25 b&w
3 for 80 x 25 color
4 for 320 x 200 color graphics
5 for 320 x 200 b & w graphics
6 for 640 x 200 b & w graphics
7 to wrap at end of line
ESC[=#;7l or ESC[=l or Resets mode # set with above command
ESC[=0l or ESC[?7l
ansi escape hotkeys
ESC[#;#;...p Keyboard reassignment. The first ASCII
or ESC["string"p code defines which code is to be
or ESC[#;"string";#; changed. The remaining codes define
#;"string";#p what it is to be changed to.
E.g. Reassign the Q and q keys to the A and a keys (and vice versa).
ESC [65;81p A becomes Q
ESC [97;113p a becomes q
ESC [81;65p Q becomes A
ESC [113;97p q becomes a
E.g. Reassign the F10 key to a DIR command.
ESC [0;68;"dir";13p The 0;68 is the extended ASCII code
for the F10 key and 13 is the ASCII
code for a carriage return.
Other function key codes F1=59,F2=60,F3=61,F4=62,F5=63
F6=64,F7=65,F8=66,F9=67,F10=68
is there a environment variable that indicates if a session has been started via an ordinary login or via "su"?
if [ "$DISPLAY" != "" ]; then
echo Login via X
else
if [ "$SSH_CONNECTION" = "" ]; then
echo Login via su
else
echo Login via ssh
fi
fi
$ echo $0
-bash
$ su -
Password:
# echo $0
-su
ps $$|grep -q -- ' -su'&&echo SU <br>
[ "$0" = "-sh" ] && echo SU <br>
Compare "who am i" with "id".<br>
Hosts file or LMHosts file, what’s the difference?
An LMHOSTS file specifies the NetBIOS computer name and IP address mappings; a HOSTS file specifies the DNS name and IP address. On a local computer, the HOSTS file (used by Windows Sockets applications to find TCP/IP host names) and LMHOSTS file (used by NetBIOS over TCP/IP to find NetBIOS computer names) can be used to list known IP addresses mapped with corresponding computer names. LMHOSTS is used for name resolution in Windows 95 for internetworks where WINS is not available.
· The HOSTS file is used as a local DNS equivalent to resolve host names to IP addresses.
· The LMHOSTS file is used as a local WINS equivalent to resolve NetBIOS computer names to IP addresses.
To take advantage of HOSTS or LMHOSTS, DNS must be enabled on the computer.
Sample versions of LMHOSTS and HOSTS files are added to the Windows NT \systemroot\System32\drivers\Etc directory when you install Microsoft TCP/IP.
20090322
http://mtc.sri.com/Conficker/
Conficker B uses a different set of sites to query its external-facing IP address www.getmyip.org, www.whatsmyipaddress.com, www.whatismyip.org, checkip.dyndns.org. It does not download the fraudware Antivirus XP software that version A attempts to download. Conficker's propagation methods vary among A and B and are described in Section <a href="http://mtc.sri.com/Conficker/#Propagation"><span style="text-decoration: underline ; color: #0014db">Conficker Propagation</span></a>. Furthermore, a recent analysis by Symantec has uncovered that the GeoIP file is directly embedded in the Conficker B binary as a compressed RAR (Roshal archive) file encrypted using RC4 [<a href="http://mtc.sri.com/Conficker/ref-11"><span style="text-decoration: underline ; color: #0014db">11</span></a>].
20090317
vmdk to vdi lotec
I personally prefer the speed of VirtualBox, but so far I have encountered many issues with USB and sound drivers.
BTW, to convert from vmdk to vdi use Gparted: <a href="http://gparted.sourceforge.net/" style="color: rgb(0, 0, 255); ">http://gparted.sourceforge.net/</a>
1-Get the iso image, and mount it in the VM or VB as a cdrom.<br>2-Create a new VDI disk and add as secondary in VMware<br>3-Boot VM from CDROM<br>4-Use Gparted to reduce the size of the partition in vmdk disk if necessary<br>5-Copy partition from vmdk disk to vdi disk<br>6-Shutdown VM and change vdi to primary disk<br>
on June 10, 2008 10:21 AM
20090316
dussss
• CASCADE: Delete or update the row from the parent table and automatically delete or update the matching rows in the child table. ON DELETE CASCADE is supported starting from MySQL 3.23.50 and ON UPDATE CASCADE is supported starting from 4.0.8. Between two tables, you should not define several ON UPDATE CASCADE clauses that act on the same column in the parent table or in the child table.
• SET NULL: Delete or update the row from the parent table and set the foreign key column or columns in the child table to NULL. This is valid only if the foreign key columns do not have the NOT NULL qualifier specified. ON DELETE SET NULL is available starting from MySQL 3.23.50 and ON UPDATE SET NULL is available starting from 4.0.8. If you specify a SET NULL action, make sure that you have not declared the columns in the child table as NOT NULL.
• NO ACTION: In standard sQL, NO ACTION means no action in the sense that an attempt to delete or update a primary key value will not be allowed to proceed if there is a related foreign key value in the referenced table. Starting from 4.0.18 InnoDB rejects the delete or update operation for the parent table.
• RESTRICT: Rejects the delete or update operation for the parent table. NO ACTION and RESTRICT are the same as omitting the ON DELETE or ON UPDATE clause. (Some database systems have deferred checks, and NO ACTION is a deferred check. In MySQL, foreign key constraints are checked immediately, so NO ACTION and RESTRICT are the same.)
• SET DEFAULT: This action is recognized by the parser, but InnoDB rejects table definitions containing ON DELETE SET DEFAULT or ON UPDATE SET DEFAULT clauses.
mysqldump -u[USERNAME] -p[PASSWORD] --add-drop-table --no-data [DATABASE] | grep ^DROP | mysql -u[USERNAME] -p[PASSWORD] [DATABASE]
sfc
your source of info or is this just more wrong answers? I would suggest the
op do: start, run, type in: sfc /scannow, hit ok.
This will fix/replace any corrupted system files.
--
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
creating shortcuts from WSH with javascript
made a little function in jscript (run with wsh or csh cscript wscript) to create windows shortcuts automatically to the desktop,...
might still be a bug in it for targetpath, but it works kinda good already ;)
//createShortCut ("shortcutname","c:\windows\notepad.exe","c:\temp\somefile.txt","c:\temp")
function createShortCut(name , target, args, wdir) {
var shell = WScript.CreateObject("WScript.Shell");
var dpath = shell.SpecialFolders("Desktop");
var short = shell.CreateShortcut(dpath + "\\" + name + ".lnk");
short.TargetPath = '"'+target+'" '+args;
short.WorkingDirectory = wdir;
short.WindowStyle = 0;
short.IconLocation = target+",0";
return(short.Save());
}
The following special folders are available:
AllUsersDesktop
AllUsersStartMenu
AllUsersPrograms
AllUsersStartup
Desktop
Favorites
Fonts
MyDocuments
NetHood
PrintHood
Programs
Recent
SendTo
StartMenu
Startup
Templates
map{ map{tr|10|# |;print} split//,sprintf"%.8b\n",$_}
unpack'C*',unpack'u*',"5`#8<3'X`'#8^-@`<-CPP`#8V/C8`"
20090310
usrName = Args(1)
RUProot = Args(2)
RUPpath = RUProot & " \" & usrName
'Get the domain
Set dse = GetObject(" LDAP://RootDSE" )
Set domain = GetObject( " LDAP://" & dse.Get(" defaultNamingContext" ))
set ou = domain.GetObject(" organizationalUnit" , " OU=" & ouName )
wscript.echo " Creating user in " & ou.Name
set usr = ou.Create(" user" , " cn=" & usrName )
usr.Put " samAccountName" , usrName
usr.Put " userPrincipalName" , usrName
usr.Put " Profilepath" , RUPpath
usr.SetInfo
wscript.echo " User " & usrName & " was created successfully in " & ou.Name & " with a RUP Path of: " & RUPpath</pre></pre>
Where is pear
curl http://pear.php.net/go-pear > go-pear.php<br class="khtml-block-placeholder">
sudo php -q go-pear.php<br>
Clearsilver on OSX Published by barneyb on December 7, 2006 in java.
<pre style="font-size: 9pt; background-color: rgb(238, 238, 238); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(112, 112, 112); border-right-color: rgb(112, 112, 112); border-bottom-color: rgb(112, 112, 112); border-left-color: rgb(112, 112, 112); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "># openssl rsa -in server.key -out server.key.insecure
Enter pass phrase for server.key:
writing RSA key
# mv server.key server.key.secure
# mv server.key.insecure server.key
# cp server.key /etc/apache2/server.key
# cp server.crt /etc/apache2/server.crt
# chmod 600 server.key
# chmod 600 server.crt
</pre><li>Edit <tt>/etc/apache2/httpd.conf</tt> and uncomment the include directive for the SSL configuration file. Change:</li><pre style="font-size: 9pt; background-color: rgb(238, 238, 238); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(112, 112, 112); border-right-color: rgb(112, 112, 112); border-bottom-color: rgb(112, 112, 112); border-left-color: rgb(112, 112, 112); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "># Secure (SSL/TLS) connections
#Include /private/etc/apache2/extra/httpd-ssl.conf
</pre>to
<pre style="font-size: 9pt; background-color: rgb(238, 238, 238); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(112, 112, 112); border-right-color: rgb(112, 112, 112); border-bottom-color: rgb(112, 112, 112); border-left-color: rgb(112, 112, 112); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "># Secure (SSL/TLS) connections
Include /private/etc/apache2/extra/httpd-ssl.conf</pre></ol>
Country Name (2 letter code) [AU]:<em>US</em>
State or Province Name (full name) [Some-State]:<em>State</em>
Locality Name (eg, city) []:<em>City</em>
Organization Name (eg, company) []: <em>company name</em>
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []: <em>servername</em>
Email Address []:
A challenge password []:
An optional company name []:
</pre>The <em>servername</em> entered for the <tt>CN</tt> should match your web server's DNS name.
<li>Sign the CSR with the CA</li><pre style="font-size: 9pt; background-color: rgb(238, 238, 238); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(112, 112, 112); border-right-color: rgb(112, 112, 112); border-bottom-color: rgb(112, 112, 112); border-left-color: rgb(112, 112, 112); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "># openssl x509 -req -days 3650 -in server.csr -CA ca.crt \
-CAkey ca.key -set_serial 01 -out server.crt
Signature ok
subject=/C=US/ST=State/L=City/O=company/CN=server
Getting CA Private Key
Enter pass phrase for ca.key: <em>*****</em></pre></ol>
<em>enter password</em>
# openssl req -new -x509 -days 365 -key ca.key -out ca.crt
<em>re-enter password from above</em>
Country Name (2 letter code) [AU]: <em>US</em>
State or Province Name (full name) [Some-State]: <em>State</em>
Locality Name (eg, city) []: <em>City</em>
Organization Name (eg, company) []: <em>company name</em>
Organizational Unit Name (eg, section) []:
Common Name (eg, YOUR name) []: <em>My CA</em>
Email Address []:
</pre><li>Generate a server key</li><pre style="font-size: 9pt; background-color: rgb(238, 238, 238); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(112, 112, 112); border-right-color: rgb(112, 112, 112); border-bottom-color: rgb(112, 112, 112); border-left-color: rgb(112, 112, 112); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "># openssl genrsa -des3 -out server.key 4096
Enter pass phrase for server.key: <em>****</em>
</pre><pre style="font-size: 9pt; background-color: rgb(238, 238, 238); border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(112, 112, 112); border-right-color: rgb(112, 112, 112); border-bottom-color: rgb(112, 112, 112); border-left-color: rgb(112, 112, 112); padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; "><br></pre></ol>
20090306
20090305
20090304
20090128
osX installer fatal error after user defined string
naming harddrive @` during installation will crash the installer before copying.
I suppose the backtick is not escaped in the installation scripts