LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-04-2004, 08:23 PM   #1
Sabicas
Member
 
Registered: Aug 2004
Distribution: Slackware 10
Posts: 110

Rep: Reputation: 15
lost .bashrc .bash_profile $100 reward ; )


Can someone post their .bashrc .bash_profile file's so I can get some aliases up and running in slack?

I know someone posted it here before I can't find it for some reason though.
 
Old 10-04-2004, 08:51 PM   #2
Sabicas
Member
 
Registered: Aug 2004
Distribution: Slackware 10
Posts: 110

Original Poster
Rep: Reputation: 15
Anybody? I'm still looking and I still can't find it. I'm not sure what needs to go into these files (I don't know how to script them) and I can't seem to find any examples or anything on the net.
 
Old 10-04-2004, 08:57 PM   #3
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 47
Code:
 # ~/.bashrc: executed by bash(1) for non-login shells.

# If running interactively, then:
if [ "$PS1" ]; then

    # don't put duplicate lines in the history. See bash(1) for more options
    # export HISTCONTROL=ignoredups

    # Use the ~/.dir_colors file to determine colors associated with the ls command
    eval `dircolors $HOME/.dir_colors`

    # define some handy aliases
    alias ls='ls --color=auto' # add color to ls
    #alias dir='ls --color=auto --format=vertical'
    #alias vdir='ls --color=auto --format=long'
    alias ll='ls -lh' # long listing format
    alias la='ls -Ah' # list hidden files
    alias l='ls -F'   # append indicator (one of */=@|) to entries
    alias rm='rm -i'  # prompt before removing files
    alias mv='mv -i'  # prompt before overwriting files with the mv command
    alias cp='cp -i'  # prompt before overwriting files with the cp command
    alias ..='cd ..'  # to move to the parent directory just use ..
    alias fetchmail='fetchmail -vk'
    alias lynx='lynx -cfg ~/.lynx.cfg'
    alias aterm='aterm +sb -sl 50% -bg black -fg white -fn 9x15'
    alias p='$PWD'

# Add . to the PATH to execute files in the current directory
export PATH=$PATH:.

# Make sure bash tab completion is turned on
source /etc/bash_completion

###############################################
# The Prompt

# MyPrompt
# The first PS1 line is for X-Terminals and the second is for virtual terminals.
# \[\033]0;\u@\h \w\007\] puts the current working directory in the X-Terminal titlebar

function MyPrompt {
local GRAD1=`tty|cut -d/ -f3`

    case $TERM in
        *term* | rxvt )
PS1="\u@\h: \w > \[\033]0;\u@\h \w\007\]" ;; 
    *)
PS1="\u@\h: \w > ";;
    esac
}
fi

MyPrompt

########## to use any of the prompts below comment out the MyPrompt above

# The following is the same as above with the addition of colors

# Define some colors first:
red='\033[0;31m'
RED='\033[1;31m'
green='\033[0;32m'
GREEN='\033[1;32m'
yellow='\033[0;33m'
YELLOW='\033[1;33m'
blue='\033[0;34m'
BLUE='\033[;1;34m'
purple='\033[0;35m'
PURPLE='\033[1;35m'
cyan='\033[0;36m'
CYAN='\033[1;36m'
white='\033[0;37m'
WHITE='\033[1;37m'
NC='\033[0m'  # No Color


# To use, uncomment the following lines
#function AnotherPrompt {
#local GRAD1=`tty|cut -d/ -f3`
#    case $TERM in
#        *term* | rxvt )
#PS1="$GREEN\u@\h: \w >$NC \[\033]0;\u@\h \w\007\]" ;; 
#    *)
#PS1="$GREEN\u@\h: \w >$NC ";;
#    esac
#}
#AnotherPrompt
#fi

################### a series of simple prompts
# Contains the username, hostname, and current directory
#PS1='\u@\h:\w\$ '
# Contains the username, current directory, and > instead of $
#PS1='\u:\w > '
# A simple colored prompt for both x-terminals and virtual terminals
#PS1="$CYAN\u:\w >$NC \[\033]0;\u@\h \w \007\]";
# A prompt with containing the current time
#PS1="$BLUE[$CYAN\$(date +%I:%M) \u \w$BLUE]$CYAN\$$NC \[\033]0;\u \w\007\]" ;; 

###############################################

#!/bin/sh
# Print a fortune cookie for interactive shells:
#if [[ $- = *i* ]]; then
#  echo
#    fortune fortunes fortunes2 linuxcookie
#      echo
#      fi
Code:
 # ~/.bash_profile: executed by bash(1) for login shells.
# I keep this file simple and put everything in ~/.bashrc

# Sets the default permissions for files. 755 for directories and 644 for files.
umask 022

# include the configurations from ~/.bashrc 
if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

export PATH=$PATH:/usr/X11R6/bin  
export PKG_CONFIG_PATH=/usr/X11R6/lib/pkgconfig 
export PATH=$PATH:/opt/kde/bin
just a sample
 
Old 10-05-2004, 12:43 PM   #4
Sabicas
Member
 
Registered: Aug 2004
Distribution: Slackware 10
Posts: 110

Original Poster
Rep: Reputation: 15
Thanks
 
Old 10-06-2004, 12:24 AM   #5
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
You can also find "dotfiles" for BASH and other programs at www.dotfiles.com . I'm sure with a little googling you can find even more.

Dennisk
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bashrc vs. bash_profile mikeshn Linux - General 9 02-10-2008 01:46 PM
bashrc or bash_profile ? ARCIS_house Linux - Newbie 6 07-21-2005 02:09 PM
.bashrc .bash_profile Soulful93 Slackware 4 05-03-2005 03:02 AM
~/.bashrc, ~/.bash_profile Sinope Linux - Newbie 6 08-17-2004 02:40 AM
.bashrc or .bash_profile? statmobile Linux - Newbie 1 02-04-2004 09:08 PM


All times are GMT -5. The time now is 06:30 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration