First define function in .bashrc and then export it
d2h(){
echo "obase=16; $@"|bc
}
export -f d2h
Above function converts decimal to hex and then export it, so that it can be used from other bash scripts
No comments:
Post a Comment