Ready to be published? LXer is read by around 350,000 individuals each month, and is an excellent place for you to publish your ideas, thoughts, reviews, complaints, etc. Do you have something to say to the Linux community?
One of theneat things a user can do on Unix is play around with the Bourne Again Shell (bash). An even more interesting thing is how the environment can be tweaked to a particular user's preference. In this text a look at how the Bash prompt can be manipulated by inserting commands and even shell code functions directly into the prompt itself.
A Sample Function inline with Bashprompt
In a recent text configuring colors for the Bash prompt was discussed. In this text a method of messing with the prompt is expanded upon by actually inserting a shell code function inline with the bash prompt.
A Basic Bash Prompt
The bash prompt has built in commands that use escape charachter syntax. By default a lot of packages ship bash with a default that shows the hostname and relative path. The escape sequences for all users is usually kept in /etc/bashrc or a similar system location.
I love stuff like this. I think anyone wanting to learn to write programs should start with a good deep dive into Bash. You can do an amazing lot of things with plain ole Bash guff!
>I think anyone wanting to learn to write programs should start with a good deep dive into Bash.
Thank you for reaffirming my belief with that statement. Now all I have to do is try it. I'll get around to it... some day.
Post a comment
A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.
Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help