function implementation for bash shell

commandline session

$ 4.2.20 44 301---> cat .bashrc
#export PS1="[ 33[0;31m] $ V # ! "
export PS1="$ V # !---> "

shellp()
{
pre=: post=:
printf "$pr%s$pon" "$@"
}

$ 4.2.20 45 302---> shellp hacker cracker maker
hacker
cracker
maker
$ 4.2.20 46 303--->

$ 4.2.20 2 457---> cat .bashrc
#export PS1="[ 33[0;31m] $ V # ! "
export PS1="$ V # !---> "

shellp()
{
pre=: post=:
printf "$pre%s$postn" "$@"
}

$ 4.2.20 3 458---> shellp hacker cracker maker
hacker
cracker
maker
$ 4.2.20 4 459---> source .bashrc
$ 4.2.20 5 460---> shellp hacker cracker maker
:hacker:
:cracker:
:maker:
$ 4.2.20 6 461--->

Leave a comment

Your email address will not be published. Required fields are marked *