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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s