bhupixb

My PC bashrc

May 30th, 2020
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.30 KB | None | 0 0
  1. # echo "inside bash"
  2. # orange=$(tput setaf 166);
  3. # yellow=$(tput setaf 228);
  4. # green=$(tput setaf 71);
  5. # white=$(tput setaf 15);
  6. # bold=$(tput bold);
  7. # reset=$(tput sgr0);
  8.  
  9. # PS1="\[${bold}\]\n";
  10. # PS1+="\[${orange}\]\u"; #username
  11. # PS1+="\[${white}\] at ";
  12. # PS1+="\[${yellow}\]\h"; #host
  13. # PS1+="\[${white}\] in ";
  14. # PS1+="\[${green}\]\W"; #working directory
  15. # PS1+="\[${white}\]\$ \[${reset}\]";
  16. # export PS1;
  17. PS1="\w $\n"
  18. # ~/.bashrc: executed by bash(1) for non-login shells.
  19. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
  20. # for examples
  21.  
  22. # If not running interactively, don't do anything
  23. case $- in
  24. *i*) ;;
  25. *) return;;
  26. esac
  27.  
  28. # don't put duplicate lines or lines starting with space in the history.
  29. # See bash(1) for more options
  30. HISTCONTROL=ignoreboth
  31.  
  32. # append to the history file, don't overwrite it
  33. shopt -s histappend
  34.  
  35. # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  36. HISTSIZE=1000
  37. HISTFILESIZE=2000
  38.  
  39. # check the window size after each command and, if necessary,
  40. # update the values of LINES and COLUMNS.
  41. shopt -s checkwinsize
  42.  
  43. # If set, the pattern "**" used in a pathname expansion context will
  44. # match all files and zero or more directories and subdirectories.
  45. #shopt -s globstar
  46.  
  47. # make less more friendly for non-text input files, see lesspipe(1)
  48. [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
  49.  
  50. # set variable identifying the chroot you work in (used in the prompt below)
  51. if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
  52. debian_chroot=$(cat /etc/debian_chroot)
  53. fi
  54.  
  55. # set a fancy prompt (non-color, unless we know we "want" color)
  56. case "$TERM" in
  57. xterm-color|*-256color) color_prompt=yes;;
  58. esac
  59.  
  60. # uncomment for a colored prompt, if the terminal has the capability; turned
  61. # off by default to not distract the user: the focus in a terminal window
  62. # should be on the output of commands, not on the prompt
  63. #force_color_prompt=yes
  64.  
  65. if [ -n "$force_color_prompt" ]; then
  66. if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
  67. # We have color support; assume it's compliant with Ecma-48
  68. # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
  69. # a case would tend to support setf rather than setaf.)
  70. color_prompt=yes
  71. else
  72. color_prompt=
  73. fi
  74. fi
  75.  
  76. if [ "$color_prompt" = yes ]; then
  77. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
  78. else
  79. PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
  80. fi
  81. unset color_prompt force_color_prompt
  82.  
  83. # If this is an xterm set the title to user@host:dir
  84. case "$TERM" in
  85. xterm*|rxvt*)
  86. PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
  87. ;;
  88. *)
  89. ;;
  90. esac
  91.  
  92. # enable color support of ls and also add handy aliases
  93. if [ -x /usr/bin/dircolors ]; then
  94. test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
  95. alias ls='ls --color=auto'
  96. #alias dir='dir --color=auto'
  97. #alias vdir='vdir --color=auto'
  98.  
  99. alias grep='grep --color=auto'
  100. alias fgrep='fgrep --color=auto'
  101. alias egrep='egrep --color=auto'
  102. fi
  103.  
  104. # colored GCC warnings and errors
  105. #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
  106.  
  107. # some more ls aliases
  108. alias ll='ls -alF'
  109. alias la='ls -A'
  110. alias l='ls -CF'
  111.  
  112. # Add an "alert" alias for long running commands. Use like so:
  113. # sleep 10; alert
  114. alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
  115.  
  116. # Alias definitions.
  117. # You may want to put all your additions into a separate file like
  118. # ~/.bash_aliases, instead of adding them here directly.
  119. # See /usr/share/doc/bash-doc/examples in the bash-doc package.
  120.  
  121. if [ -f ~/.bash_aliases ]; then
  122. . ~/.bash_aliases
  123. fi
  124.  
  125. # enable programmable completion features (you don't need to enable
  126. # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
  127. # sources /etc/bash.bashrc).
  128. if ! shopt -oq posix; then
  129. if [ -f /usr/share/bash-completion/bash_completion ]; then
  130. . /usr/share/bash-completion/bash_completion
  131. elif [ -f /etc/bash_completion ]; then
  132. . /etc/bash_completion
  133. fi
  134. fi
  135. # added by Anaconda3 5.3.1 installer
  136. # >>> conda init >>>
  137. # !! Contents within this block are managed by 'conda init' !!
  138. __conda_setup="$(CONDA_REPORT_ERRORS=false '/home/bhupi/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
  139. if [ $? -eq 0 ]; then
  140. \eval "$__conda_setup"
  141. else
  142. if [ -f "/home/bhupi/anaconda3/etc/profile.d/conda.sh" ]; then
  143. . "/home/bhupi/anaconda3/etc/profile.d/conda.sh"
  144. CONDA_CHANGEPS1=false conda activate base
  145. else
  146. \export PATH="/home/bhupi/anaconda3/bin:$PATH"
  147. fi
  148. fi
  149. unset __conda_setup
  150. # <<< conda init <<<
  151.  
  152. #HADOOP VARIABLES START
  153. export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-i386
  154. export HADOOP_INSTALL=/usr/local/hadoop
  155. export PATH=$PATH:$HADOOP_INSTALL/bin
  156. export PATH=$PATH:$HADOOP_INSTALL/sbin
  157. export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
  158. export HADOOP_COMMON_HOME=$HADOOP_INSTALL
  159. export HADOOP_HDFS_HOME=$HADOOP_INSTALL
  160. export YARN_HOME=$HADOOP_INSTALL
  161. export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_INSTALL/lib/native
  162. export HADOOP_OPTS="-Djava.library.path=$HADOOP_INSTALL/lib"
  163. #HADOOP VARIABLES END
Add Comment
Please, Sign In to add comment