minor style consistency
This commit is contained in:
17
profile.sh
17
profile.sh
@@ -469,7 +469,8 @@ export -f ppg
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Create a directory then goes inside
|
# Create a directory then goes inside
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
mcd () {
|
mcd ()
|
||||||
|
{
|
||||||
if [[ ! $# -eq 1 ]] ; then
|
if [[ ! $# -eq 1 ]] ; then
|
||||||
echo "Create a directory then goes inside."
|
echo "Create a directory then goes inside."
|
||||||
echo "Usage: mcd <directory>"
|
echo "Usage: mcd <directory>"
|
||||||
@@ -482,7 +483,8 @@ export -f mcd
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Get PID list of the given process name
|
# Get PID list of the given process name
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
gpid () {
|
gpid ()
|
||||||
|
{
|
||||||
[[ $UID -eq 0 ]] && local psopt="-A"
|
[[ $UID -eq 0 ]] && local psopt="-A"
|
||||||
[[ $# -eq 1 ]] && local single=1
|
[[ $# -eq 1 ]] && local single=1
|
||||||
for pid in $@; do
|
for pid in $@; do
|
||||||
@@ -501,7 +503,8 @@ export -f gpid
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Remove host from know_host (name and IP) for the active user
|
# Remove host from know_host (name and IP) for the active user
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
rmhost () {
|
rmhost ()
|
||||||
|
{
|
||||||
if [[ "$#" -lt 1 ]]; then
|
if [[ "$#" -lt 1 ]]; then
|
||||||
echo "Error: incorrect number of parameters."
|
echo "Error: incorrect number of parameters."
|
||||||
echo "Usage: rmhost <hostname|ip> [hostname2|ip2 [...]]"
|
echo "Usage: rmhost <hostname|ip> [hostname2|ip2 [...]]"
|
||||||
@@ -545,7 +548,8 @@ export -f rmhost
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Rename all files in current directory to replace spaces with _
|
# Rename all files in current directory to replace spaces with _
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
rmspc () {
|
rmspc ()
|
||||||
|
{
|
||||||
local lst=""
|
local lst=""
|
||||||
for opt in $@ ; do
|
for opt in $@ ; do
|
||||||
case $opt in
|
case $opt in
|
||||||
@@ -944,7 +948,8 @@ export -f taz
|
|||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# Display system general information
|
# Display system general information
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
showinfo() {
|
showinfo()
|
||||||
|
{
|
||||||
echo -e "\n"
|
echo -e "\n"
|
||||||
if command -v figlet >/dev/null 2>&1; then
|
if command -v figlet >/dev/null 2>&1; then
|
||||||
figlet -k $(hostname)
|
figlet -k $(hostname)
|
||||||
@@ -1041,7 +1046,7 @@ settrace ()
|
|||||||
for opt in $@ ; do
|
for opt in $@ ; do
|
||||||
case $opt in
|
case $opt in
|
||||||
"-h"|"--help")
|
"-h"|"--help")
|
||||||
echo "Try to activate bactrace display for script debugging."
|
echo "Try to activate backtrace display for script debugging."
|
||||||
echo
|
echo
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --on Activate backtrace generation"
|
echo " --on Activate backtrace generation"
|
||||||
|
|||||||
Reference in New Issue
Block a user