Ricardo

将 Bash 函数作为命令使用

阅读时长: 1 分钟

函数作为命令行命令

配置函数脚本

Bash
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# $ cat ~/.bashrc 
# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# User specific aliases and functions
. ~/.utils/toolsfunc.sh

然后把脚本放到对应目录就可以执行了

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
记录自己
Built with Hugo
主题 Stack 由 Jimmy 设计