Linux News
The world is talking about GNU/Linux and Free/Open Source Software
          
         
        
        
          
Using Functions in a BASH Prompt
  | 
 
     
      
        
          
            
              | 
              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.
  See the rest of the article for more info. Full Story  | 
| Subject | 
Topic Starter | 
Replies | 
Views | 
Last Post | 
  | bash is fun! | 
  tuxchick | 
  1 | 
  3,360 | 
  Jun 11, 2007 1:15 PM | 
You cannot post until you login.