Created
          April 24, 2018 14:31 
        
      - 
      
- 
        Save sudarshang/f4785cc529cab34fa7e7c1d9248aa0b1 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| # Start a new bash shell with a severely filtered environment and no initfile. | |
| if [ -z "$_BFR_RUNNING" ]; then | |
| env -i \ | |
| _BFR_RUNNING=1 \ | |
| PATH="$PATH" \ | |
| LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \ | |
| TERM="$TERM" \ | |
| SHELL="$SHELL" \ | |
| USER="$USER" \ | |
| HOME="$HOME/bfr-home" \ | |
| LANG="$LANG" \ | |
| bash --init-file "$0" "$@" <&0 | |
| exit $? | |
| else | |
| unset _BFR_RUNNING | |
| fi | |
| # What remains of this file is the initfile. | |
| USER=user | |
| HOSTNAME=hostname | |
| PS1='\n\[\033[32;45;1m\]\w\[\033[m\]\$ ' | |
| eval "$(dircolors -b)" | |
| alias ls='ls --color=auto' | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
From this hn comment https://news.ycombinator.com/item?id=16911032