Skip to content

Instantly share code, notes, and snippets.

@tousinn
tousinn / gist:4679043
Last active December 11, 2015 23:48
How to get the File Name, Extension of the File , the File Path under shell
1.How to get the File Name
test_full_file_path="/home/doc/myfile.txt"
file_name=`basename ${test_full_file_path}`
or
file_name=${test_full_file_path##*/}
2.How to get the extension of the file
test_full_file_path="/home/doc/myfile.txt"
file_name=`basename ${test_full_file_path}`
@tousinn
tousinn / spdoc.txt
Created January 24, 2013 04:17
The explanation of parameters which are used to make the oracle statspack report.
-----------------------------------------------------------------------
Oracle11g Server
Release 11.1
Production
-------------------------------------------------------------------------