Wednesday, September 8, 2010

exporting bash aliases and functions into a variable

I'm getting a little git gist happy. :) So here's something just for kicks. I'm gonna start posting other things than bash. Perhaps more python and php code. ATM I'm reading "JavaScript: The Good Parts" I highly recommend this book, it's a good read. Been meaning to read it for a while to brush up on my js coding skills, because I plan on doing a lot of nodejs development here in the near future for a import/export system.

function export_aliases(){
export ALIASES=`alias|awk '{print $2}'|cut -d = -f 1|xargs`
}
#export_aliases
function export_functions(){
export FUNCTIONS=`declare -F|awk '{print $3}'|xargs`
}

No comments: