wangming1993 / issues

记录学习中的一些问题,体会与心得 https://wangming1993.github.io/issues
8 stars 4 forks source link

linux shell常用命令 #37

Open wangming1993 opened 7 years ago

wangming1993 commented 7 years ago
#!/bin/bash

cmd=$1
#Get first char of the first arg
cmd=${cmd:0:1}

#Remove first arg from args
shift

if [ $cmd == 'l' ];then
    local $@
else
    remote $@
fi