Structual bashrc

This commit is contained in:
2014-08-04 17:40:25 +08:00
parent 56a34a1f12
commit 00e123d9fa
8 changed files with 180 additions and 3 deletions

22
bash/bashrc/sources/50_blog Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
if [[ ! -f ~/wconvv/native/bin ]]; then
return 1
fi
export PATH=$PATH:~/wconv/native/bin/
function blog () {
if [[ -z 'command -v cj' ]]; then
echo "Cannot find cj"
return 1
fi
if [[ -z "$1" ]]; then
__func_head "CONTENT(CJ)"
echo
else
FILE=$(date +%Y%m%d)
echo "$1 " | xargs -d' ' cj >> ~/blog/$FILE
fi
}