Tuesday, September 10, 2013
Airlines
https://mobile.jetstar.com/s/booking
Vietnam airlines:
https://wl-prod.sabresonicweb.com/SSW2010/B3QE/webqtrip.html?execution=e1s1
label:
Airlines,
jetstar,
Vietnam airlines
Monday, July 15, 2013
Reset Windows password
Boot with CDROM installer: Repair your computer | Command Prompt |
copy c:\windows\system32\sethc.exe c:\
copy c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe
Reboot Windows with "Shift 5 times"
net user geek MyNewPassword
Reboot with CDROM installer: Command Prompt
copy c:\sethc.exe c:\windows\system32\sethc.exe
label:
Reset Windows password,
sethc.exe
Sunday, June 23, 2013
Command-Line editing mode
set -o emacs (bash initially starts with emacs-mode, or see -noediting option for more details)
or set -o vi
emacs editing mode
+ CTRL - B: backward one character
+ CTRL - F: forward one character
+ DEL: delete one character backward
+ CTRL - D: delete one character forward
+ ESC - B: backward one word
+ ESC - F: forward one word
+ ESC - DEL: delete one word backward
+ ESC - D: delete one word forward
+ CTRL - A: Move tobeginning
+ CTRL - E: Move to end
+ CTRL - K: Kill forward to end
+ ESC - F: forward one word
+ ESC - DEL: delete one word backward
+ ESC - D: delete one word forward
+ CTRL - A: Move tobeginning
+ CTRL - E: Move to end
+ CTRL - K: Kill forward to end
vi editing mode
+ h: move left one character
+ l: move right one character
+ b: move left one word
+ w: move right one word
+ h: move left one character
+ l: move right one character
+ b: move left one word
+ w: move right one word
Wednesday, May 29, 2013
Copy contents to clipboard
Start | Run | shell:sendto
Create new shortcut with "location"
CMD /C CLIP <
Monday, May 13, 2013
Firefox shortcuts:: Tips
TAB::
Ctrl + Tab
Ctrl + (1-9)
Ctrl + 9:
Ctrl + T
Ctrl + N
Ctrl + Shift + T
Ctrl + W
TAB Groups::
Ctrl + Shift + E
Address & Search:
Ctrl + L
Ctrl + K
label:
Firefox,
Firefox shortcuts,
Tips
Tuesday, May 7, 2013
DEK Technologies Headquarters
DEK Technologies Headquarters Melbourne, Australia
DEK Technologies Pty. Ltd.
Cnr Riggall St and Maldon St
Broadmeadows, VIC. 3047
Australia.
Phone: +61 3 9309 1808
Fax: +61 3 9309 1878
Email: info@dektech.com.au
Postal Address
P.O. Box 713
Dallas, 3047
Victoria, Australia
label:
Australia,
DEK Technologies,
Headquarters,
Melbourne
Friday, May 3, 2013
Mail configuration for Outlook 2007
To configure Outlook 2007 for your Gmail address:
- Enable POP in your email account. Don't forget to click Save Changes when you're done.
- Open Outlook.
- Click the Tools menu, and select Account Settings...
- On the E-mail tab, click New...
- If you are prompted to Choose E-mail Service, select Microsoft Exchange, POP3, IMAP, or HTTP, and click Next.
- Fill in all necessary fields to include the following information: Your Name: Enter your name as you would like it to appear in the From: field of outgoing messages.
- Click Next. If you are configuring Outlook 2007 automatically, you're done! Just click Finish.
- If you are configuring Outlook 2007 manually, select Internet E-mail and click Next.
- Verify your User Information, and enter the following additional information: Server Information
- Click the More Settings... button, and select the Outgoing Server tab.
- Check the box next to My outgoing server (SMTP) requires authentication and select Use same settings as my incoming mail server.
- Click the Advanced tab, and check the box next to This server requires an encrypted connection (SSL) under Incoming Server (POP3).
- In the Outgoing server (SMTP) box, enter 587, and select TLS from the drop-down menu next to Use the following type of encrypted connection:.
- Click OK.
- Click Test Account Settings... After receiving 'Congratulations! All tests completed successfully', click Close.
- Click Next, and then click Finish.
Email Address: Enter your full Gmail email address (username@gmail.com). Google Apps users, enter your full address in the formatusername@your_domain.com.
Password: Enter your email password.
Manually configure server settings or additional server types: Leave this option unchecked if you want to automatically configure Outlook 2007. If you want to manually configure Outlook 2007, check this box now. Google Apps users should configure manually as follows.
Account Type: POP3
Incoming mail server: pop.gmail.com (Google Apps users, enter the server names provided, don't add your domain name in these steps)
Outgoing mail server (SMTP): smtp.gmail.com
Logon Information
User Name: Enter your Gmail username (including @gmail.com). Google Apps users, enter your full address in the format username@your_domain.com
Password: Enter your email password.
Require logon using Secure Password Authentication (SPA): Leave this option unchecked.
Congratulations! You're done configuring your client to send and retrieve Gmail messages.
Thursday, May 2, 2013
regsvr32.exe
In computing,
regsvr32
(Microsoft Register Server) is a command-line utility in Microsoft Windows operating systems for registering and unregistering DLLs and ActiveX controls in the Windows Registry.
To be used with regsvr32, a DLL must export the functions
DllRegisterServer
and DllUnregisterServer
.regsvr32 shmedia.dll
for registering a fileregsvr32 /u shmedia.dll
for unregistering a file
If another copy of shmedia.dll exists in the system search path, regsvr32 may choose that copy instead of the one in the current directory. This problem can usually be solved by specifying a full path (e.g., c:\windows\system32\shmedia.dll) or using the following syntax:
regsvr32 .\shmedia.dll
Thursday, April 18, 2013
"Send To" menu context in Windows
Windows | Run | shell:sendto
HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explore
- Create a new DWORD (32-bit) value named NoDrivesInSendToMenu
- Double-click NoDrivesInSendToMenu and set its value data to 1
HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\Send To.
---> Just delete the ones you don't use.
Friday, April 12, 2013
28022013
28022013 Project: See https://28022013.codeplex.com/
Project Description
- Collect tips and tricks C/C++ programming languages
- Shell scripts i.e: Bash, C shell
- Testing Codeplex purpose only
git config --global user.name "altonjuve"
git config --global user.email "viet2105@outlook.com"
------ just for backup::: git clone https://git01.codeplex.com/28022013 CodePlex
git add cbf.bash
git commit -m "cbf.bash"
git add create_dir_for_iandv.sh
git commit -m "add create_dir_for_iandv.sh"
git add ffp.sh
git commit -m "add ffp.sh"
git add get_bin.sh
git commit -m "add get_bin.sh"
git add get_node_ipaddr.sh
git commit -m "add get_node_ipaddr.sh"
git add repac.sh
git commit -m "add repac.sh"
git add ccode.sh
git commit -m "my first commit to CodePlex"
git push origin master
Sunday, December 2, 2012
Thread safe programming
There are several ways in which a function can be thread safe.
It can be reentrant. This means that a function has no state, and does not touch any global or static variables, so it can be called from multiple threads simultaneously. The term comes from allowing one thread to enter the function while another thread is already inside it.
It can have a critical section. This term gets thrown around a lot, but frankly I prefer critical data. A critical section occurs any time your code touches data that is shared across multiple threads. So I prefer to put the focus on that critical data.
If you use a mutex properly, you can synchronize access to the critical data, properly protecting from thread unsafe modifications. Mutexes and Locks are very useful, but with great power comes great responsibility. You must not lock the same mutex twice within the same thread (that is a self-deadlock). You must be careful if you acquire more than one mutex, as it increases your risk for deadlock. You must consistently protect your data with mutexes.
If all of your functions are thread safe, and all of your shared data properly protected, your application should be thread safe.
As Crazy Eddie said, this is a huge subject. I recommend reading up on boost threads, and using them accordingly.
low-level caveat: compilers can reorder statements, which can break thread safety. With multiple cores, each core has its own cache, and you need to properly sync the caches to have thread safety. Also, even if the compiler doesn't reorder statements, the hardware might. So, full, guaranteed thread safety isn't actually possible today. You can get 99.99% of the way there though, and work is being done with compiler vendors and cpu makers to fix this lingering caveat.
Anyway, if you're looking for a checklist to make a class thread-safe:
- Identify any data that is shared across threads (if you miss it, you can't protect it)
- create a member
boost::mutex m_mutex
and use it whenever you try to access that shared member data (ideally the shared data is private to the class, so you can be more certain that you're protecting it properly). - clean up globals. Globals are bad anyways, and good luck trying to do anything thread-safe with globals.
- Beware the
static
keyword. It's actually not thread safe. So if you're trying to do a singleton, it won't work right. - Beware the Double-Checked Lock Paradigm. Most people who use it get it wrong in some subtle ways, and it's prone to breakage by the low-level caveat.
That's an incomplete checklist. I'll add more if I think of it, but hopefully it's enough to get you started.
source: http://stackoverflow.com/questions/5125241/how-to-make-an-application-thread-safe
http://en.wikipedia.org/wiki/Thread_safety
Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it only manipulates shared data structures in a manner that guarantees safe execution by multiple threads at the same time. There are various strategies for making thread-safe data structures.[1][2]
A key challenge in multi-threaded programming, thread safety was not a concern for most application developers until the 1990s when operating systems began to expose multiple threads for code execution. Today, a program may execute code on several threads simultaneously in a sharedaddress space where each of those threads has access to virtually all of the memory of every other thread. Thread safety is a property that allows code to run in multi-threaded environments by re-establishing some of the correspondences between the actual flow of control and the text of the program, by means of synchronization.
Levels of thread safety
Software libraries can provide certain thread-safety guarantees. For example, concurrent reads might be guaranteed to be thread-safe, but concurrent writes might not be. Whether or not a program using such a library is thread-safe depends on whether it uses the library in a manner consistent with those guarantees.
- Thread safe: Implementation is guaranteed to be free of race conditions when accessed by multiple threads simultaneously.
- Conditionally safe: Different threads can access different objects simultaneously, and access to shared data is protected from race conditions.
- Not thread safe: Code should not be accessed simultaneously by different threads.
Thread safety guarantees usually also include design steps to prevent or limit the risk of different forms of deadlocks, as well as optimizations to maximize concurrent performance. However, deadlock-free guarantees can not always be given, since deadlocks can be caused by callbacks and violation of architectural layering independent of the library itself.
[edit]Implementation approaches
There are a several approaches for avoiding race conditions to achieve thread safety. The first class of approaches focuses on avoiding shared state, and includes:
- Re-entrancy
- Writing code in such a way that it can be partially executed by a thread, reexecuted by the same thread or simultaneously executed by another thread and still correctly complete the original execution. This requires the saving of state information in variables local to each execution, usually on a stack, instead of in static or global variables or other non-local state. All non-local state must be accessed through atomic operations and the data-structures must also be reentrant.
- Thread-local storage
- Variables are localized so that each thread has its own private copy. These variables retain their values across subroutine and other code boundaries, and are thread-safe since they are local to each thread, even though the code which accesses them might be executed simultaneously by another thread.
The second class of approaches are synchronization-related, and are used in situations where shared state cannot be avoided:
- Mutual exclusion
- Access to shared data is serialized using mechanisms that ensure only one thread reads or writes to the shared data at any time. Incorporation of mutal exclusion needs to be well thought out, since improper usage can lead to side-effects like deadlocks, livelocks and resource starvation.
- Atomic operations
- Shared data are accessed by using atomic operations which cannot be interrupted by other threads. This usually requires using special machine language instructions, which might be available in a runtime library. Since the operations are atomic, the shared data are always kept in a valid state, no matter how other threads access it. Atomic operations form the basis of many thread locking mechanisms, and are used to implement mutual exclusion primitives.
- Immutable objects
- The state of an object cannot be changed after construction. This implies that only read-only data is shared and inherent thread safety. Mutable (non-const) operations can then be implemented in such a way that they create new objects instead of modifying existing ones. This approach is used by the string implementations in Java, C# and python.[7]
[edit]Examples
In the following piece of C code, the function is thread-safe, but not reentrant:
#includeint increment_counter () { static int counter = 0; static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex); // only allow one thread to increment at a time ++counter; // store value before any other threads increment it further int result = counter; pthread_mutex_unlock(&mutex); return result; }
In the above,
increment_counter
can be called by different threads without any problem since a mutex is used to synchronize all access to the shared counter
variable. But if the function is used in a reentrant interrupt handler and a second interrupt arises inside the function, the second routine will hang forever. As interrupt servicing can disable other interrupts, the whole system could suffer.
The same function can be implemented to be both thread-safe and reentrant using the lock-free atomics in C++11:
#includeint increment_counter () { static std::atomic<int> counter(0); // increment is guaranteed to be done atomically int result = ++counter; return result; }
Wednesday, November 28, 2012
CXXFLAGS and CFLAGS
723 ifneq ($(HW), 21255)
724 ifeq ($(HW), 21240)
725 CFLAGS_64 += -D__USE_STD_IOSTREAM
726 CFLAGS_64 += -D_REENTRANT
727 CFLAGS_64 += -wd47
728 CFLAGS_64 += -wd69
729 CFLAGS_64 += -wd174
730 CFLAGS_64 += -wd271
731 CFLAGS_64 += -wd1572
732 endif
733 ifeq ($(HW), 21250)
734 CFLAGS_64 += -wd47
735 CFLAGS_64 += -wd101
736 CFLAGS_64 += -wd174
737 CFLAGS_64 += -wd271
738 CFLAGS_64 += -wd1572
739 endif
740 CFLAGS_64 += -wd68
741 CFLAGS_64 += -wd167
742 CFLAGS_64 += -wd181
743 CFLAGS_64 += -wd556
744 ifeq ($(HW), 21240)
745 CXXFLAGS_64 += -wd82
746 CXXFLAGS_64 += -wd69
747 CXXFLAGS_64 += -wd271
748 CXXFLAGS_64 += -wd181
749 endif
750 ifeq ($(HW), 21250)
751 CXXFLAGS_64 += -wd82
752 CXXFLAGS_64 += -wd69
753 endif
754 CXXFLAGS_64 += -wd68
755 CXXFLAGS_64 += -wd181
756 CXXFLAGS_64 += -wd411
757 else
758 CFLAGS_64 += -Wno-unused
759 CFLAGS_64 += -Wno-implicit
760 CFLAGS_64 += -Wno-redundant-decls
761 CFLAGS_64 += -Wno-sign-compare
762 CFLAGS_64 += -Wno-format-extra-args
763 CFLAGS_64 += -Wno-format
764 CFLAGS_64 += -Wno-uninitialized
765 CFLAGS_64 += -Wno-missing-field-initializers
766 CFLAGS_64 += -Wno-conversion
767 endif
Saturday, November 24, 2012
Mac OS X TIGER 10.4 Users (Darwin) Apps v
Antivirus:
ClamXAV v.2.2.1
Safari:
Safari v.4.1.3
Installer:
MacPorts 2.1.2
Programming:
Xcode: v.2.5
GNU cflow v.1.0
Exuberant Ctags 5.8
cscope: version 15.8a
powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1
powerpc-apple-darwin8-g++-4.0.1 (GCC) 4.0.1
Splint 3.1.2 --- 24 Nov 2012
Friday, November 23, 2012
Redirect all output in shell script to a file
REF: http://www.thetechrepo.com/main-articles/532
( echo "this is line 1 of my script" cat /proc/cpuinfo dmesg echo "this is the end of my script" ) 2>> /tmp/filename.log
typeset log_fl=`basename $0`_` date +'%H%M%S'`.log
# sending this script output to the log file
exec 1>${log_fl}
bash internal variables
Built-in Shell Variables
Built-in variables areautomatically set bythe shell and aretypically used inside shell scripts.
Built-in variables can make use of the variable substitution patterns shown previously. Note
that the$is not actually partofthe variable name, although the variable is always referenced
this way.The following areavailable in any Bourne-compatible shell:
$# Number of command-line arguments.
$- Options currently in effect (arguments supplied on command line or to
set). The shell sets some options automatically.
$? Exit value of last executed command.
$$ Pr ocess number of current process.
$! Pr ocess number of last background command.
$0 First word; that is, the command name. This will havethe full pathname if
it was found via a PATHsearch.
$n Individual arguments on command line (positional parameters). The
Bourne shell allows only nine parameters to be referenced directly (n=1–9);
Bash allowsnto be greater than 9 if specified as${n}.
$*,$@ All arguments on command line ($1 $2...).
"$*" All arguments on command line as one string ("$1 $2..."). The values are
separated bythe first character in IFS.
"$@" All arguments on command line, individually quoted ("$1" "$2"...).
Variable Substitution
No spaces should be used in the following expressions. The colon (:) is optional; if it’s
included,varmust be nonnull as well as set.
var=value... Seteach variablevarto avalue.
${var} Usevalue ofvar;braces areoptional ifvaris separated from the
following text. They arerequired for array variables.
${var:-value} Usevarif set; otherwise, usevalue.
${var:=value} Usevarif set; otherwise, usevalueand assignvaluetovar.
${var:?value} Usevarif set; otherwise, printvalueand exit (if not interactive). If
valueisn’t supplied, print the phrase “parameter null or not set.”
${var:+value} Usevalueifvaris set; otherwise, use nothing.
${#var} Usethe length ofvar.
${#*} Usethe number of positional parameters.
${#@} Same as previous.
${var#pattern} Usevalue ofvarafter removingpatter nfrom the left. Remove the
shor testmatching piece.
${var##pattern} Same as#patter n,but remove the longest matching piece.
${var%pattern} Usevalue ofvarafter removingpatter nfrom the right. Remove
the shortest matching piece.
${var%%pattern} Same as%patter n,but remove the longest matching piece.
${!prefix*},${!prefix@} List of variables whose names begin withprefix.
${var:pos},${var:pos:len} Star tingat positionpos(0-based) in variablevar,extractlenchar-
acters, or extract rest of string if nolen.posandlenmay be arith-
metic expressions.
${var/pat/repl} Usevalue ofvar,with first match ofpatreplaced withrepl.
${var/pat} Usevalue ofvar,with first match ofpatdeleted.
${var//pat/repl} Usevalue ofvar,with ever ymatch ofpatreplaced withrepl.
${var/#pat/repl} Usevalue ofvar,with match ofpatreplaced withrepl.Match
must occur at beginning of the value.
${var/%pat/repl} Usevalue ofvar,with match ofpatreplaced withrepl.Match
must occur at end of the value.
Bash provides a special syntax that lets one variable indirectly reference another:
$greet="hello, world" Create initial variable
$friendly_message=greet Aliasing variable
$echo ${!friendly_message} Usethe alias
hello, world
REF: http://tldp.org/LDP/abs/html/internalvariables.html
9.1. Internal Variables
- Builtin variables:
- variables affecting bash script behavior
- $BASH
- The path to the Bash binary itself
bash$ echo $BASH /bin/bash
- $BASH_ENV
- An environmental variable pointing to a Bash startup file to be read when a script is invoked
- $BASH_SUBSHELL
- A variable indicating the subshell level. This is a new addition to Bash, version 3.
See Example 21-1 for usage. - $BASHPID
- Process ID of the current instance of Bash. This is not the same as the $$ variable, but it often gives the same result.
bash4$ echo $$ 11015 bash4$ echo $BASHPID 11015 bash4$ ps ax | grep bash4 11015 pts/2 R 0:00 bash4
But ...
#!/bin/bash4 echo "\$\$ outside of subshell = $$" # 9602 echo "\$BASH_SUBSHELL outside of subshell = $BASH_SUBSHELL" # 0 echo "\$BASHPID outside of subshell = $BASHPID" # 9602 echo ( echo "\$\$ inside of subshell = $$" # 9602 echo "\$BASH_SUBSHELL inside of subshell = $BASH_SUBSHELL" # 1 echo "\$BASHPID inside of subshell = $BASHPID" ) # 9603 # Note that $$ returns PID of parent process.
- $BASH_VERSINFO[n]
- A 6-element array containing version information about the installed release of Bash. This is similar to $BASH_VERSION, below, but a bit more detailed.
# Bash version info: for n in 0 1 2 3 4 5 do echo "BASH_VERSINFO[$n] = ${BASH_VERSINFO[$n]}" done # BASH_VERSINFO[0] = 3 # Major version no. # BASH_VERSINFO[1] = 00 # Minor version no. # BASH_VERSINFO[2] = 14 # Patch level. # BASH_VERSINFO[3] = 1 # Build version. # BASH_VERSINFO[4] = release # Release status. # BASH_VERSINFO[5] = i386-redhat-linux-gnu # Architecture # (same as $MACHTYPE).
- $BASH_VERSION
- The version of Bash installed on the system
bash$ echo $BASH_VERSION 3.2.25(1)-release
tcsh% echo $BASH_VERSION BASH_VERSION: Undefined variable.
Checking $BASH_VERSION is a good method of determining which shell is running. $SHELL does not necessarily give the correct answer. - $CDPATH
- A colon-separated list of search paths available to the cd command, similar in function to the $PATH variable for binaries. The $CDPATH variable may be set in the local ~/.bashrc file.
bash$ cd bash-doc bash: cd: bash-doc: No such file or directory bash$ CDPATH=/usr/share/doc bash$ cd bash-doc /usr/share/doc/bash-doc bash$ echo $PWD /usr/share/doc/bash-doc
- $DIRSTACK
- The top value in the directory stack [1] (affected by pushd and popd)
This builtin variable corresponds to the dirs command, however dirs shows the entire contents of the directory stack. - $EDITOR
- The default editor invoked by a script, usually vi or emacs.
- $EUID
- "effective" user ID number
Identification number of whatever identity the current user has assumed, perhaps by means of su.
The $EUID is not necessarily the same as the $UID. - $FUNCNAME
- Name of the current function
xyz23 () { echo "$FUNCNAME now executing." # xyz23 now executing. } xyz23 echo "FUNCNAME = $FUNCNAME" # FUNCNAME = # Null value outside a function.
See also Example A-50. - $GLOBIGNORE
- A list of filename patterns to be excluded from matching in globbing.
- $GROUPS
- Groups current user belongs to
This is a listing (array) of the group id numbers for current user, as recorded in /etc/passwd and /etc/group.
root# echo $GROUPS 0 root# echo ${GROUPS[1]} 1 root# echo ${GROUPS[5]} 6
- $HOME
- Home directory of the user, usually /home/username (see Example 10-7)
- $HOSTNAME
- The hostname command assigns the system host name at bootup in an init script. However, the gethostname() function sets the Bash internal variable $HOSTNAME. See also Example 10-7.
- $HOSTTYPE
- host type
Like $MACHTYPE, identifies the system hardware.
bash$ echo $HOSTTYPE i686
- $IFS
- internal field separator
This variable determines how Bash recognizes fields, or word boundaries, when it interprets character strings.
$IFS defaults to whitespace (space, tab, and newline), but may be changed, for example, to parse a comma-separated data file. Note that $* uses the first character held in $IFS. SeeExample 5-1.
bash$ echo "$IFS" (With $IFS set to default, a blank line displays.) bash$ echo "$IFS" | cat -vte ^I$ $ (Show whitespace: here a single space, ^I [horizontal tab], and newline, and display "$" at end-of-line.) bash$ bash -c 'set w x y z; IFS=":-;"; echo "$*"' w:x:y:z (Read commands from string and assign any arguments to pos params.)
See also Example 16-41, Example 11-7, and Example 19-14 for instructive examples of using $IFS. - $IGNOREEOF
- Ignore EOF: how many end-of-files (control-D) the shell will ignore before logging out.
- $LC_COLLATE
- Often set in the .bashrc or /etc/profile files, this variable controls collation order in filename expansion and pattern matching. If mishandled, LC_COLLATE can cause unexpected results in filename globbing.
As of version 2.05 of Bash, filename globbing no longer distinguishes between lowercase and uppercase letters in a character range between brackets. For example, ls [A-M]* would match both File1.txt and file1.txt. To revert to the customary behavior of bracket matching, set LC_COLLATE to C by an export LC_COLLATE=C in /etc/profile and/or ~/.bashrc. - $LC_CTYPE
- This internal variable controls character interpretation in globbing and pattern matching.
- $LINENO
- This variable is the line number of the shell script in which this variable appears. It has significance only within the script in which it appears, and is chiefly useful for debugging purposes.
# *** BEGIN DEBUG BLOCK *** last_cmd_arg=$_ # Save it. echo "At line number $LINENO, variable \"v1\" = $v1" echo "Last command argument processed = $last_cmd_arg" # *** END DEBUG BLOCK ***
- $MACHTYPE
- machine type
Identifies the system hardware.
bash$ echo $MACHTYPE i686
- $OLDPWD
- Old working directory ("OLD-Print-Working-Directory", previous directory you were in).
- $OSTYPE
- operating system type
bash$ echo $OSTYPE linux
- $PATH
- Path to binaries, usually /usr/bin/, /usr/X11R6/bin/, /usr/local/bin, etc.
When given a command, the shell automatically does a hash table search on the directories listed in the path for the executable. The path is stored in the environmental variable, $PATH, a list of directories, separated by colons. Normally, the system stores the $PATH definition in /etc/profile and/or ~/.bashrc (see Appendix G).
bash$ echo $PATH /bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin:/sbin:/usr/sbin
PATH=${PATH}:/opt/bin appends the /opt/bin directory to the current path. In a script, it may be expedient to temporarily add a directory to the path in this way. When the script exits, this restores the original $PATH (a child process, such as a script, may not change the environment of the parent process, the shell).
The current "working directory", ./, is usually omitted from the $PATH as a security measure. - $PIPESTATUS
- Array variable holding exit status(es) of last executed foreground pipe.
bash$ echo $PIPESTATUS 0 bash$ ls -al | bogus_command bash: bogus_command: command not found bash$ echo ${PIPESTATUS[1]} 127 bash$ ls -al | bogus_command bash: bogus_command: command not found bash$ echo $? 127
The members of the $PIPESTATUS array hold the exit status of each respective command executed in a pipe. $PIPESTATUS[0] holds the exit status of the first command in the pipe,$PIPESTATUS[1] the exit status of the second command, and so on.
The $PIPESTATUS variable may contain an erroneous 0 value in a login shell (in releases prior to 3.0 of Bash).
tcsh% bash bash$ who | grep nobody | sort bash$ echo ${PIPESTATUS[*]} 0
The above lines contained in a script would produce the expected 0 1 0 output.
Thank you, Wayne Pollock for pointing this out and supplying the above example.
The $PIPESTATUS variable gives unexpected results in some contexts.
bash$ echo $BASH_VERSION 3.00.14(1)-release bash$ $ ls | bogus_command | wc bash: bogus_command: command not found 0 0 0 bash$ echo ${PIPESTATUS[@]} 141 127 0
Chet Ramey attributes the above output to the behavior of ls. If ls writes to a pipe whose output is not read, then SIGPIPE kills it, and its exit status is 141. Otherwise its exit status is 0, as expected. This likewise is the case for tr.
$PIPESTATUS is a "volatile" variable. It needs to be captured immediately after the pipe in question, before any other command intervenes.
bash$ $ ls | bogus_command | wc bash: bogus_command: command not found 0 0 0 bash$ echo ${PIPESTATUS[@]} 0 127 0 bash$ echo ${PIPESTATUS[@]} 0
The pipefail option may be useful in cases where $PIPESTATUS does not give the desired information. - $PPID
The $PPID of a process is the process ID (pid) of its parent process. [2]
Compare this with the pidof command.- $PROMPT_COMMAND
- A variable holding a command to be executed just before the primary prompt, $PS1 is to be displayed.
- $PS1
- This is the main prompt, seen at the command-line.
- $PS2
- The secondary prompt, seen when additional input is expected. It displays as ">".
- $PS3
- The tertiary prompt, displayed in a select loop (see Example 11-29).
- $PS4
- The quartenary prompt, shown at the beginning of each line of output when invoking a script with the -x option. It displays as "+".
- $PWD
- Working directory (directory you are in at the time)
This is the analog to the pwd builtin command.
#!/bin/bash E_WRONG_DIRECTORY=85 clear # Clear the screen. TargetDirectory=/home/bozo/projects/GreatAmericanNovel cd $TargetDirectory echo "Deleting stale files in $TargetDirectory." if [ "$PWD" != "$TargetDirectory" ] then # Keep from wiping out wrong directory by accident. echo "Wrong directory!" echo "In $PWD, rather than $TargetDirectory!" echo "Bailing out!" exit $E_WRONG_DIRECTORY fi rm -rf * rm .[A-Za-z0-9]* # Delete dotfiles. # rm -f .[^.]* ..?* to remove filenames beginning with multiple dots. # (shopt -s dotglob; rm -f *) will also work. # Thanks, S.C. for pointing this out. # A filename (`basename`) may contain all characters in the 0 - 255 range, #+ except "/". # Deleting files beginning with weird characters, such as - #+ is left as an exercise. (Hint: rm ./-weirdname or rm -- -weirdname) echo ls -al # Any files left? echo "Done." echo "Old files deleted in $TargetDirectory." echo # Various other operations here, as necessary. exit $?
- $REPLY
- The default value when a variable is not supplied to read. Also applicable to select menus, but only supplies the item number of the variable chosen, not the value of the variable itself.
#!/bin/bash # reply.sh # REPLY is the default value for a 'read' command. echo echo -n "What is your favorite vegetable? " read echo "Your favorite vegetable is $REPLY." # REPLY holds the value of last "read" if and only if #+ no variable supplied. echo echo -n "What is your favorite fruit? " read fruit echo "Your favorite fruit is $fruit." echo "but..." echo "Value of \$REPLY is still $REPLY." # $REPLY is still set to its previous value because #+ the variable $fruit absorbed the new "read" value. echo exit 0
- $SECONDS
- The number of seconds the script has been running.
#!/bin/bash TIME_LIMIT=10 INTERVAL=1 echo echo "Hit Control-C to exit before $TIME_LIMIT seconds." echo while [ "$SECONDS" -le "$TIME_LIMIT" ] do if [ "$SECONDS" -eq 1 ] then units=second else units=seconds fi echo "This script has been running $SECONDS $units." # On a slow or overburdened machine, the script may skip a count #+ every once in a while. sleep $INTERVAL done echo -e "\a" # Beep! exit 0
- $SHELLOPTS
- The list of enabled shell options, a readonly variable.
bash$ echo $SHELLOPTS braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs
- $SHLVL
- Shell level, how deeply Bash is nested. [3] If, at the command-line, $SHLVL is 1, then in a script it will increment to 2.
This variable is not affected by subshells. Use $BASH_SUBSHELL when you need an indication of subshell nesting. - $TMOUT
- If the $TMOUT environmental variable is set to a non-zero value time, then the shell prompt will time out after $time seconds. This will cause a logout.
As of version 2.05b of Bash, it is now possible to use $TMOUT in a script in combination with read.
# Works in scripts for Bash, versions 2.05b and later. TMOUT=3 # Prompt times out at three seconds. echo "What is your favorite song?" echo "Quickly now, you only have $TMOUT seconds to answer!" read song if [ -z "$song" ] then song="(no answer)" # Default response. fi echo "Your favorite song is $song."
There are other, more complex, ways of implementing timed input in a script. One alternative is to set up a timing loop to signal the script when it times out. This also requires a signal handling routine to trap (see Example 32-5) the interrupt generated by the timing loop (whew!).
Example 9-2. Timed Input
#!/bin/bash # timed-input.sh # TMOUT=3 Also works, as of newer versions of Bash. TIMER_INTERRUPT=14 TIMELIMIT=3 # Three seconds in this instance. # May be set to different value. PrintAnswer() { if [ "$answer" = TIMEOUT ] then echo $answer else # Don't want to mix up the two instances. echo "Your favorite veggie is $answer" kill $! # Kills no-longer-needed TimerOn function #+ running in background. # $! is PID of last job running in background. fi } TimerOn() { sleep $TIMELIMIT && kill -s 14 $$ & # Waits 3 seconds, then sends sigalarm to script. } Int14Vector() { answer="TIMEOUT" PrintAnswer exit $TIMER_INTERRUPT } trap Int14Vector $TIMER_INTERRUPT # Timer interrupt (14) subverted for our purposes. echo "What is your favorite vegetable " TimerOn read answer PrintAnswer # Admittedly, this is a kludgy implementation of timed input. # However, the "-t" option to "read" simplifies this task. # See the "t-out.sh" script. # However, what about timing not just single user input, #+ but an entire script? # If you need something really elegant ... #+ consider writing the application in C or C++, #+ using appropriate library functions, such as 'alarm' and 'setitimer.' exit 0
An alternative is using stty.
Example 9-3. Once more, timed inputPerhaps the simplest method is using the -t option to read.
#!/bin/bash # timeout.sh # Written by Stephane Chazelas, #+ and modified by the document author. INTERVAL=5 # timeout interval timedout_read() { timeout=$1 varname=$2 old_tty_settings=`stty -g` stty -icanon min 0 time ${timeout}0 eval read $varname # or just read $varname stty "$old_tty_settings" # See man page for "stty." } echo; echo -n "What's your name? Quick! " timedout_read $INTERVAL your_name # This may not work on every terminal type. # The maximum timeout depends on the terminal. #+ (it is often 25.5 seconds). echo if [ ! -z "$your_name" ] # If name input before timeout ... then echo "Your name is $your_name." else echo "Timed out." fi echo # The behavior of this script differs somewhat from "timed-input.sh." # At each keystroke, the counter resets. exit 0
Example 9-4. Timed read
#!/bin/bash # t-out.sh [time-out] # Inspired by a suggestion from "syngin seven" (thanks). TIMELIMIT=4 # 4 seconds read -t $TIMELIMIT variable <&1 # ^^^ # In this instance, "<&1" is needed for Bash 1.x and 2.x, # but unnecessary for Bash 3+. echo if [ -z "$variable" ] # Is null? then echo "Timed out, variable still unset." else echo "variable = $variable" fi exit 0
- $UID
- User ID number
Current user's user identification number, as recorded in /etc/passwd
This is the current user's real id, even if she has temporarily assumed another identity through su. $UID is a readonly variable, not subject to change from the command line or within a script, and is the counterpart to the id builtin.
Example 9-5. Am I root?See also Example 2-3.
#!/bin/bash # am-i-root.sh: Am I root or not? ROOT_UID=0 # Root has $UID 0. if [ "$UID" -eq "$ROOT_UID" ] # Will the real "root" please stand up? then echo "You are root." else echo "You are just an ordinary user (but mom loves you just the same)." fi exit 0 # ============================================================= # # Code below will not execute, because the script already exited. # An alternate method of getting to the root of matters: ROOTUSER_NAME=root username=`id -nu` # Or... username=`whoami` if [ "$username" = "$ROOTUSER_NAME" ] then echo "Rooty, toot, toot. You are root." else echo "You are just a regular fella." fi
The variables $ENV, $LOGNAME, $MAIL, $TERM, $USER, and $USERNAME are not Bash builtins. These are, however, often set as environmental variables in one of the Bash startup files. $SHELL, the name of the user's login shell, may be set from /etc/passwd or in an "init" script, and it is likewise not a Bash builtin.
tcsh% echo $LOGNAME bozo tcsh% echo $SHELL /bin/tcsh tcsh% echo $TERM rxvt bash$ echo $LOGNAME bozo bash$ echo $SHELL /bin/tcsh bash$ echo $TERM rxvt
Positional Parameters
- $0, $1, $2, etc.
- Positional parameters, passed from command line to script, passed to a function, or set to a variable (see Example 4-5 and Example 15-16)
- $#
- Number of command-line arguments [4] or positional parameters (see Example 36-2)
- $*
- All of the positional parameters, seen as a single word
"$*" must be quoted. - $@
- Same as $*, but each parameter is a quoted string, that is, the parameters are passed on intact, without interpretation or expansion. This means, among other things, that each parameter in the argument list is seen as a separate word.
Of course, "$@" should be quoted. Example 9-6. arglist: Listing arguments with $* and $@Following a shift, the $@ holds the remaining command-line parameters, lacking the previous $1, which was lost.
#!/bin/bash # arglist.sh # Invoke this script with several arguments, such as "one two three". E_BADARGS=65 if [ ! -n "$1" ] then echo "Usage: `basename $0` argument1 argument2 etc." exit $E_BADARGS fi echo index=1 # Initialize count. echo "Listing args with \"\$*\":" for arg in "$*" # Doesn't work properly if "$*" isn't quoted. do echo "Arg #$index = $arg" let "index+=1" done # $* sees all arguments as single word. echo "Entire arg list seen as single word." echo index=1 # Reset count. # What happens if you forget to do this? echo "Listing args with \"\$@\":" for arg in "$@" do echo "Arg #$index = $arg" let "index+=1" done # $@ sees arguments as separate words. echo "Arg list seen as separate words." echo index=1 # Reset count. echo "Listing args with \$* (unquoted):" for arg in $* do echo "Arg #$index = $arg" let "index+=1" done # Unquoted $* sees arguments as separate words. echo "Arg list seen as separate words." exit 0
#!/bin/bash # Invoke with ./scriptname 1 2 3 4 5 echo "$@" # 1 2 3 4 5 shift echo "$@" # 2 3 4 5 shift echo "$@" # 3 4 5 # Each "shift" loses parameter $1. # "$@" then contains the remaining parameters.
The $@ special parameter finds use as a tool for filtering input into shell scripts. The cat "$@" construction accepts input to a script either from stdin or from files given as parameters to the script. See Example 16-24 and Example 16-25.
The $* and $@ parameters sometimes display inconsistent and puzzling behavior, depending on the setting of $IFS. Example 9-7. Inconsistent $* and $@ behavior
#!/bin/bash # Erratic behavior of the "$*" and "$@" internal Bash variables, #+ depending on whether they are quoted or not. # Inconsistent handling of word splitting and linefeeds. set -- "First one" "second" "third:one" "" "Fifth: :one" # Setting the script arguments, $1, $2, etc. echo echo 'IFS unchanged, using "$*"' c=0 for i in "$*" # quoted do echo "$((c+=1)): [$i]" # This line remains the same in every instance. # Echo args. done echo --- echo 'IFS unchanged, using $*' c=0 for i in $* # unquoted do echo "$((c+=1)): [$i]" done echo --- echo 'IFS unchanged, using "$@"' c=0 for i in "$@" do echo "$((c+=1)): [$i]" done echo --- echo 'IFS unchanged, using $@' c=0 for i in $@ do echo "$((c+=1)): [$i]" done echo --- IFS=: echo 'IFS=":", using "$*"' c=0 for i in "$*" do echo "$((c+=1)): [$i]" done echo --- echo 'IFS=":", using $*' c=0 for i in $* do echo "$((c+=1)): [$i]" done echo --- var=$* echo 'IFS=":", using "$var" (var=$*)' c=0 for i in "$var" do echo "$((c+=1)): [$i]" done echo --- echo 'IFS=":", using $var (var=$*)' c=0 for i in $var do echo "$((c+=1)): [$i]" done echo --- var="$*" echo 'IFS=":", using $var (var="$*")' c=0 for i in $var do echo "$((c+=1)): [$i]" done echo --- echo 'IFS=":", using "$var" (var="$*")' c=0 for i in "$var" do echo "$((c+=1)): [$i]" done echo --- echo 'IFS=":", using "$@"' c=0 for i in "$@" do echo "$((c+=1)): [$i]" done echo --- echo 'IFS=":", using $@' c=0 for i in $@ do echo "$((c+=1)): [$i]" done echo --- var=$@ echo 'IFS=":", using $var (var=$@)' c=0 for i in $var do echo "$((c+=1)): [$i]" done echo --- echo 'IFS=":", using "$var" (var=$@)' c=0 for i in "$var" do echo "$((c+=1)): [$i]" done echo --- var="$@" echo 'IFS=":", using "$var" (var="$@")' c=0 for i in "$var" do echo "$((c+=1)): [$i]" done echo --- echo 'IFS=":", using $var (var="$@")' c=0 for i in $var do echo "$((c+=1)): [$i]" done echo # Try this script with ksh or zsh -y. exit 0 # This example script by Stephane Chazelas, # and slightly modified by the document author.
The $@ and $* parameters differ only when between double quotes. Example 9-8. $* and $@ when $IFS is empty
#!/bin/bash # If $IFS set, but empty, #+ then "$*" and "$@" do not echo positional params as expected. mecho () # Echo positional parameters. { echo "$1,$2,$3"; } IFS="" # Set, but empty. set a b c # Positional parameters. mecho "$*" # abc,, # ^^ mecho $* # a,b,c mecho $@ # a,b,c mecho "$@" # a,b,c # The behavior of $* and $@ when $IFS is empty depends #+ on which Bash or sh version being run. # It is therefore inadvisable to depend on this "feature" in a script. # Thanks, Stephane Chazelas. exit
Other Special Parameters
- $-
- Flags passed to script (using set). See Example 15-16.
This was originally a ksh construct adopted into Bash, and unfortunately it does not seem to work reliably in Bash scripts. One possible use for it is to have a script self-test whether it is interactive. - $!
- PID (process ID) of last job run in background
LOG=$0.log COMMAND1="sleep 100" echo "Logging PIDs background commands for script: $0" >> "$LOG" # So they can be monitored, and killed as necessary. echo >> "$LOG" # Logging commands. echo -n "PID of \"$COMMAND1\": " >> "$LOG" ${COMMAND1} & echo $! >> "$LOG" # PID of "sleep 100": 1506 # Thank you, Jacques Lederer, for suggesting this.
Using $! for job control:
possibly_hanging_job & { sleep ${TIMEOUT}; eval 'kill -9 $!' &> /dev/null; } # Forces completion of an ill-behaved program. # Useful, for example, in init scripts. # Thank you, Sylvain Fourmanoit, for this creative use of the "!" variable.
Or, alternately:
# This example by Matthew Sage. # Used with permission. TIMEOUT=30 # Timeout value in seconds count=0 possibly_hanging_job & { while ((count < TIMEOUT )); do eval '[ ! -d "/proc/$!" ] && ((count = TIMEOUT))' # /proc is where information about running processes is found. # "-d" tests whether it exists (whether directory exists). # So, we're waiting for the job in question to show up. ((count++)) sleep 1 done eval '[ -d "/proc/$!" ] && kill -15 $!' # If the hanging job is running, kill it. }
- $_
- Special variable set to final argument of previous command executed.
Example 9-9. Underscore variable
#!/bin/bash echo $_ # /bin/bash # Just called /bin/bash to run the script. # Note that this will vary according to #+ how the script is invoked. du >/dev/null # So no output from command. echo $_ # du ls -al >/dev/null # So no output from command. echo $_ # -al (last argument) : echo $_ # :
- $?
- Exit status of a command, function, or the script itself (see Example 24-7)
- $$
- Process ID (PID) of the script itself. [5] The $$ variable often finds use in scripts to construct "unique" temp file names (see Example 32-6, Example 16-31, and Example 15-27). This is usually simpler than invoking mktemp.
Notes
[1] | A stack register is a set of consecutive memory locations, such that the values stored (pushed) are retrieved (popped) in reverse order. The last value stored is the first retrieved. This is sometimes called a LIFO (last-in-first-out) or pushdown stack. |
[2] | The PID of the currently running script is $$, of course. |
[3] | Somewhat analogous to recursion, in this context nesting refers to a pattern embedded within a larger pattern. One of the definitions of nest, according to the 1913 edition of Webster's Dictionary, illustrates this beautifully: "A collection of boxes, cases, or the like, of graduated size, each put within the one next larger." |
[4] | The words "argument" and "parameter" are often used interchangeably. In the context of this document, they have the same precise meaning: a variable passed to a script or function. |
[5] | Within a script, inside a subshell, $$ returns the PID of the script, not the subshell. |
Subscribe to:
Posts (Atom)
Labels
- _ASSERTE (1)
- _CRT_ASSERT (1)
- _CRT_ERROR (1)
- _CRT_WARN (1)
- _RPT0 (1)
- _RPT2 (1)
- _RPTF2 (1)
- -1073741515 (1)
- .vimrc (3)
- \160 (1)
- 00 (1)
- 0unzip (1)
- 10.4 (1)
- 1073741515 (1)
- 10minutemail (1)
- 28022013 (1)
- 5giay (1)
- ABI (1)
- absolute (1)
- Airlines (1)
- alias (2)
- Apple (3)
- Arch Linux (1)
- arduino (1)
- assignment (2)
- Australia (1)
- auto (1)
- Avoid (1)
- AvoidDirectlyAccessGlobals (1)
- AXE central processors (1)
- AXE system (1)
- bash (6)
- Bash script (3)
- bashrc (2)
- BIG_ENDIAN (1)
- bit-fields (1)
- blogspot (1)
- break down (1)
- buffer overflows (1)
- bug tracking (1)
- build (1)
- Built-in Shell Variables (1)
- C library (1)
- C programming (1)
- c shell (2)
- C++ (1)
- C++ Programming (1)
- C++Test (2)
- case (1)
- cast (1)
- cc (1)
- CDRWIN (1)
- CFLAGS (1)
- change management (1)
- check (1)
- check float values equality (1)
- checker (1)
- CHECKSUM (1)
- chrome (1)
- cl.exe (1)
- clearcase (1)
- Clearcase commands (1)
- cleartool (2)
- Clock (1)
- CloneCD (1)
- cloud (2)
- cmd (1)
- co.cc (1)
- CodePlex (1)
- Coding (1)
- Coding standard (1)
- Coding Standards (1)
- color (1)
- colour (1)
- Command Line (1)
- Command-Line (1)
- Command-Line editing (1)
- Command-Line editing mode (1)
- CommandLine (1)
- compilation (1)
- compile (1)
- compiler (2)
- compliance (1)
- compliance checker (1)
- constructor (1)
- Copy (2)
- cpp programming (1)
- CreateFile (2)
- creator (1)
- critical systems (2)
- cscope (3)
- csh (1)
- ctags (1)
- customer service (1)
- CXXFLAGS (1)
- dangerous functions (1)
- DCB sructure (1)
- Debian (1)
- debug (2)
- DEK Technologies (1)
- Delete (1)
- detected (1)
- Dev-cpp (1)
- developers (1)
- device (1)
- device driver (1)
- DeviceIoControl (1)
- diagram (1)
- diff (1)
- Directly (1)
- disposable (1)
- disposable e-mail addresses (1)
- divide and conquer. (1)
- dns (2)
- domainname (1)
- downgrade (1)
- drawback (1)
- dropbox (1)
- e-mail addresses (1)
- eclipse (1)
- Edit (1)
- End (1)
- environment (1)
- epsilon (1)
- Ericsson (4)
- ERLANG (2)
- errno (1)
- Error (2)
- error code (1)
- error result (1)
- example (1)
- Excel (1)
- exec (1)
- execute (1)
- execution time (1)
- exit code (1)
- explicit calculation of pointer (1)
- explorer (1)
- facebook (3)
- fansipan (1)
- fb (1)
- Fedora (1)
- fgets (1)
- Firefox (1)
- Firefox shortcuts (1)
- float (1)
- float equality (1)
- floating point (1)
- folding (1)
- forwarding (1)
- free (1)
- FreeCommander (1)
- from cl (1)
- function (1)
- Functions (3)
- FunctionsCallOrder (1)
- gitdiff (1)
- global data (1)
- gmail (1)
- GNU (5)
- google (1)
- GreatNews (1)
- Ground (1)
- Guerrilla Mail (1)
- Guidelines (1)
- Headquarters (1)
- help desk ticketing (1)
- high-level (1)
- holiday (1)
- Home (1)
- host (1)
- hostname (2)
- hosts (2)
- howto (1)
- iCloud (1)
- ide (1)
- illegal (1)
- implementation code (1)
- indexing (1)
- inet_pton (1)
- interface header (1)
- ioctl() (1)
- iPhone (1)
- iPhoneVietnam (1)
- java (1)
- jetstar (1)
- Job Ad (1)
- Karaoke (1)
- Korn shell (1)
- labelname (1)
- layers (1)
- Legibility (1)
- less confusing (1)
- linux (2)
- LITTLE_ENDIAN (1)
- login (1)
- lsocket (1)
- Lunar new yeat (1)
- Mac (1)
- Mac OS (1)
- Mac OS shortcuts (1)
- mailinator (1)
- maintainability (2)
- make (2)
- make clean (2)
- Makefile (2)
- Mandriva (1)
- Melbourne (1)
- memory (2)
- Microsoft (1)
- Mint (1)
- mintemail (1)
- misra (3)
- MISRA-C (1)
- MISRA-C 2004 (1)
- misra2004 (1)
- Mobifone (1)
- MobileMe (1)
- Modular (1)
- Modular programming (1)
- modules (1)
- more readable (1)
- Multi-Targeting (1)
- nbtscan (1)
- nbtstat (1)
- nested (1)
- network (1)
- network operations (1)
- nm. objdump (1)
- NoMachine (1)
- notepad++ (1)
- OFFLOAD (1)
- open() (1)
- OpenNx (1)
- OpenSSH (1)
- OpenStack (1)
- openSUSE (2)
- Orcas (1)
- outlook (1)
- outlook 2007 (1)
- parasoft (7)
- parts (1)
- password (1)
- Paste (1)
- patterns (1)
- PCLinuxOS (1)
- PCmover (1)
- perl (2)
- pkgmgr (1)
- PLEX (2)
- PLEX-C (1)
- pointer (2)
- pointer alignment (1)
- Pointer arithmetic (1)
- pop (1)
- Precompile (1)
- print16() (1)
- print32() (1)
- printHex() (1)
- programming (4)
- Programming Language for EXchanges (1)
- prompt (1)
- protocol (1)
- Puppy Linux (1)
- push (1)
- putty (2)
- re-use (1)
- read() (1)
- readelf (1)
- ReadFile (1)
- real-time (1)
- regsvr32 (1)
- request tracker (1)
- Reset Windows password (1)
- risky (1)
- rule (1)
- Sabayon Gentoo Live CD (1)
- safe (1)
- safety code (1)
- SBG HW environment (1)
- Screen (1)
- script (2)
- secure (1)
- Security (1)
- Send To (1)
- Send To menu (1)
- SendTo (1)
- serial number (1)
- serial port (1)
- Serial programming (2)
- services (1)
- sethc.exe (1)
- setup (1)
- setview (2)
- shared mem (1)
- shell (3)
- shell:sendto (1)
- side effects (1)
- site feed (1)
- skew (1)
- Slackware (1)
- snprintf (1)
- socket (1)
- source (1)
- ssh (2)
- status (1)
- strace (1)
- stray (1)
- string (2)
- strncat (1)
- strncpy (1)
- struct (1)
- SunOS (1)
- SWAP16/32 (1)
- switch (1)
- symbol (2)
- system (1)
- system() cmd (1)
- Tab (1)
- taglist (1)
- TC shell (1)
- TCP (1)
- tcpdump (1)
- technique (1)
- Telnet Client (1)
- tenmien (1)
- test (1)
- Testing (1)
- Tet (1)
- Thread safe (1)
- Thread safe programming (1)
- thread safety (1)
- Thunderbird (2)
- Tiger (1)
- tip (1)
- Tips (1)
- trick (1)
- tutorial (1)
- typedef (1)
- Ubuntu (1)
- UCdetector (1)
- uninitialized (1)
- union (1)
- unix (3)
- Unix access (1)
- unsafe (2)
- unsafe string (1)
- unzip (1)
- update (1)
- upgrade (1)
- useful tools (2)
- Variable Substitution (1)
- variables (1)
- vav (3)
- vav.vn (2)
- version (1)
- vi (2)
- Vietnam airlines (1)
- Viettel (1)
- vim (4)
- vimdiff (1)
- viminfo (1)
- Vinaphone (1)
- Violation (2)
- Vista (2)
- visual studio (1)
- vnnic (1)
- void (1)
- vs2005 (1)
- vs2008 (1)
- vspc (1)
- warranty (1)
- web (1)
- website (2)
- website test (1)
- Win8 (1)
- Windows (2)
- Windows 8.1 (1)
- winsxs (1)
- winsxslite (1)
- WinXP (1)
- workflow processes (1)
- write() (1)
- WriteFile (1)
- X (1)
- x11 (1)
- x64 (1)
- Xming (1)
- youth counselling (1)
- youtube (1)
- zebrazone (1)
- zebrazoo (1)
- zim (1)