diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2023-03-21 15:55:25 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2023-03-21 15:55:25 +0800 |
commit | 75df3b9db3bd8ea22911c12caca22f8b2b0ca69d (patch) | |
tree | 0c97e15ad68eac647bc8a11956e6a9d103fa717b | |
parent | 15ebee599391040d7bfcdfafaa8eb63dcfef86ca (diff) |
Make token as a callable command
-rw-r--r-- | alias | 3 | ||||
-rwxr-xr-x | bin/unix/token | 6 |
2 files changed, 6 insertions, 3 deletions
@@ -423,9 +423,6 @@ alias clock-reset='hwclock --systohc' | |||
423 | # misc | 423 | # misc |
424 | alias foo='echo bar > foo && echo File foo is created && ls -lh foo' | 424 | alias foo='echo bar > foo && echo File foo is created && ls -lh foo' |
425 | alias bar='echo foo > bar && echo File bar is created && ls -lh bar' | 425 | alias bar='echo foo > bar && echo File bar is created && ls -lh bar' |
426 | token() { | ||
427 | cd $SETTING_DIR/tokens && [[ -e $1 ]] && cat $1 || ls -l | ||
428 | } | ||
429 | unalias gr &>/dev/null | 426 | unalias gr &>/dev/null |
430 | gr() { | 427 | gr() { |
431 | grep -IR $1 . | 428 | grep -IR $1 . |
diff --git a/bin/unix/token b/bin/unix/token new file mode 100755 index 0000000..e410e0e --- /dev/null +++ b/bin/unix/token | |||
@@ -0,0 +1,6 @@ | |||
1 | #! /bin/sh | ||
2 | |||
3 | cd ~/helper/tokens | ||
4 | |||
5 | cat $1 && exit 0 | ||
6 | ls -l && exit 1 | ||