Favorite Bash profile commands

In keeping with nbar recent discussion of favorite commands, I'll start a discussion on favorite commands in your Bash profile.
I have these lines in my extended bash profile script.
# Prevent control-d from exit a console session. 
# Use exit or logout. 
set -o ignoreeof
# Allow editing of retrieved commands. (the up arrow)
# Use the history command to show past commands
shopt -s histverify
# I like to printout the current directory after any cd command
# Use functions so I do not have to add to the path variable.
# Print current directory after change directory command cd
alias cd='cdir'
# Define a command to change a directory and list the resulting directory
function cdir ()
  \cd "$*"
  pwd
  # Define a new command called e.## common text editor front end.# I'm tired of nano.#function e (){  # Which os?   if [ "${OSTYPE:0:6}" = "darwin" ] ; then    # Mac OS X specific syntax    if [ -w $* ] ; then      open -a textwrangler $*    elif [ -r $* ] ; then      # use textwranglers powers to edit      open -a textwrangler $*    else      # for the tuff stuff :-(      # hints at:       #  http://apple.stackexchange.com/questions/20199/how-do-i-open-a-file-as-root-in-textedit-on-lion      echo "open files with warning message. You will need to switch to panel."        echo      sudo  "/Applications/Textedit.app/Contents/MacOS/TextEdit" "$*"    fi     else    # Ubuntu stuff    if [ -w $* ] ; then      gedit $*    else      gksudo gedit $*    fi  fi} # Define a new command called settings to list various options.function settings (){  ( echo "---------- env"; \  env; \  echo "--------- set"; \  set; \  echo "--------- export"; \  export; \  echo "--------- export -f"; \  export -f; \  echo "--------- alias"; \  alias; \  echo "--------- set -o"; \  set -o; \  echo "--------- shopt"; \  shopt; \  echo "--------- enable -a"; \  enable -a; ) | less }

The following is a shell function that I use in my command prompt to display ONLY the last n subdirectory names (for example the last 3 subdirectory names).  The \W which is the default PS1 magic that displays the current working directory in your promote ONLY displays the name of the directory and none of the path.  The \w magic displays the entire path, which can be way too long.  My __cwd() function displays the last n subdirectories
So changing your default prompt from:
    PS1="\h:\W \u\$ "
to
    PS1="\h:\$(__cwd 3) \u\$ "
# __cwd() - function to create current working directory prompt string.  I
#           want less than the entire path, and more than just the last
#           element in the path.  It turns out the bash prompt string can
#           execute a script function, so I created my own bit of code to
#           generate the current working directory prompt string I want.
# Usage:  PS1="...\$(__cwd 3)..."
#         Where:   3 in the above example is the number of subdirectories to
#                  keep. 3 is also the default if no value is given.
#         Output:  /
#                  /usr
#                  /usr/share
#                  /usr/share/vim
#                  /.../share/vim/vim63
#                  ~/
#                  ~/Music
#                  ~/Music/iTunes
#                  ~/Music/iTunes/iTunes\ Music  # notice spaces are honored
#                  ~/.../iTunes/iTunes\ Music/Beach Boys
#                  ~/.../iTunes\ Music/Beach\ Boys/Made\ in\ the\ U.S.A.
__cwd()
    n="${1:-3}"             # if no dir count, default to 3
    p="#${PWD}"             # add # so after split # represents the root dir
    IFS="/"                 # split on directory divider '/'
    set ${p/#\#${HOME}/\~}  # Replace #$HOME with ~ and split into dir parts
    p="${1}"                # ${1} has # or ~, save it
    shift $(($#-(n+1) < 0 ? 0 : $#-(n+1)))   # remove excess leading dirs
    [[ "${1}" != [#~]* ]] && p="${p}/..."    # ... represents a partial path
    for ((j=2; j<n+2; j++)); do p="${p}/${!j}"; done # append last n dirs
    while [[ "${p}" = [#/]/* ]]; do p="${p#?}"; done # del leading /'s and #
    while [[ "${p}" = *[^~]/ ]]; do p="${p%?}"; done # del trailing /'s
    printf "%q" "${p}"      # generate path str w/shell magic chars quoted
As my professors used to say:  "Figuring out how __cwd() works is left as an exercise for the student."
In reality, my PS1 prompt is much more complex.  I also colorize my prompt.  For example:
    PS1="\D{%a@%R}[\[\e[44;36;1m\]\h\[\e[0m\]]\[\e[34;1m\]\$(__cwd 3)\[\e[0m\]> "
This will generate a prompt similar to the following:
    Thu@15:09[BobBookPro]~/.../iTunes/iTunes\ Music/Beatles>
Where 'BobBookPro' will be Cyan text on Blue (I couldn't get the forum to generate the blue background, but it really does look nice when you see it on the actual terminal.  And the "~/.../iTunes/iTunes\ Music/Beatles" will be Blue.
Where:
\D{%a@%R} is prompt magic to substitute the day of the week @ time of day.
All the \[...\] notation tells the prompt that non-printing character codes are happening between.  In this case the color codes are inside the \[...\]
\e[44;36;1m says cyan text on blue
\e[34;1m says blue text
\h is the computer name.  If you are having any problems getting the Mac to always use your System Preferences -> Sharing -> Computer name, you could replace "\h" with "$(networksetup -getcomputername)"
# Prompt Colors
#         -foreground- ----bold---- -underline-- --reverse---   -background-
# black         \e[30m     \e[30;1m     \e[30;4m     \e[30;7m    \e[40;fg;1m
# red           \e[31m     \e[31;1m     \e[31;4m     \e[31;7m    \e[41;fg;1m
# green         \e[32m     \e[32;1m     \e[32;4m     \e[32;7m    \e[42;fg;1m
# yellow        \e[33m     \e[33;1m     \e[33;4m     \e[33;7m    \e[43;fg;1m
# blue          \e[34m     \e[34;1m     \e[34;4m     \e[34;7m    \e[44;fg;1m
# magenta       \e[35m     \e[35;1m     \e[35;4m     \e[35;7m    \e[45;fg;1m
# cyan          \e[36m     \e[36;1m     \e[36;4m     \e[36;7m    \e[46;fg;1m
# White         \e[37m     \e[37;1m     \e[37;4m     \e[37;7m    \e[47;fg;1m
# Reset         \e[0m
I have several different Mac, Linux, Solaris, AIX system I work with on a regular basis.  I use different hostname colors so it is easier for me to see by the color with terminal window I'm currently using.  Also when I'm scrolling through my scroll back history, the colored prompts make it easy to see the commands vs the output, which is very useful if the output is very long.
Message was edited by: BobHarris

Similar Messages

  • [solved] hook to run commands when user logs in? (before bash profile)

    Is there any way to run commands when a user logs in but before the bash profile is sourced?
    For example, I have a user account with a home directory on /tmp. When the user logs in, the home directory might not exist so there will be no .bash_profile to source. I want to run a script to create the directory if necessary and copy some files into it. How can that be done?
    I thought of putting something in /etc/profile or /etc/profile.d/, but I would like to run something before the user's shell and environment become active.
    I can use /etc/rc.local to do what I want, but I would prefer a hook to ensure that everything is set right when the user logs in.
    Any ideas?
    *edit*
    Solution
    In my case, I found that I could write my own shell script and set it as a login shell. In the script, I can configure everything I need before launching the interactive shell, then clean up anything after it exits.
    Last edited by Xyne (2011-12-10 19:34:07)

    Thanks, dammannj. PAM could probably do what I need but I think I have found a simpler solution (see original post).

  • GNU screen not loading users bash .profile

    When I start a screen session in Leopard it looks like I'm stuck with a default bash profile. In Tiger it loaded the current users profile.
    How do I tell screen to load the current users .profile file? This is making running apps from DarwinPorts in a screen session a real pain.

    hi chrisdkk,
    i've noticed this to, and some other info that may be helpful. i have various screenrcs lying around for quick startup of my favorite sessions. in all of these, i had 'deflogin on' as a way of forcing screen to run bash as a login shell and, therefore, source things like /etc/profile, ~/.bash_profile, ... by the way, deflogin's default value is usually 'on' anyway, so most wouldn't even notice this.
    it seems that Leopard's screen was compiled without utmp support, which would enable the 'deflogin' screenrc setting and the '-l' command line arg.
    i'm tempted to grab screen sources, recompile using some bizarro prefix, add it to the run and lib paths, and see if that works. if so, it seems like something that should be addressed in future leopard updates. after all, it worked properly in tiger, unless there's some technical reason for leaving out the utmp option that i'm not aware of, which is completely possible.

  • -bash:  cat: command not found (or grep)

    Hi, Strange things:
    i3: okn$ ls -R | grep -h "dof" | cat > dtext.txt
    -bash:  cat: command not found
    or then I get this:
    i3: okn$ find . -type f -print | grep -c
    -bash:  grep: command not found
    but this is not happening all the time, i remember grep or cat did work once or twice...
    What's going on here?
    OS 10.7.4; repaired permissions
    Any assistance much appreciated!
    / bw, Omar KN

    'cat' is stored in /bin/cat, NOT /usr/bin/cat, which explains the file not found messages above.
    HOWEVER, the information you have provided seems to imply you have the executables, and previous information provides says you have a valid PATH:
    echo $PATH
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/bin:/bin:/usr/sbi n:/sbin:/usr/local/bin:/usr/X11/bin
    this creates a mystery as to why you are getting:
    -bash:  cat: command not found
    -bash:  grep: command not found
    I have a couple of thoughts.
    a) I'm wondering if you have any 'alias' statements in your .bash_profile (or .bash_login, or .profile, or .bashrc).
    b) if you would get the same results should you rename your .bash_profile (and/or .bash_login, .profile, .bashrc) to something like saved.bash_profile, then restart your terminal session (basically eliminating any personalized shell customization).
    c) what would happen if you created a new account (System Preferences -> Accounts) - basically a clean starting point.
    d) are you executing these commands from the command prompt?  Or from within a shell script?
    d.1) if from within a shell script, is the script file the correct file format.
    file name.shell.script
    you want to check that the output from the 'file' command DOES NOT say "...with CRLF line terminators...", as that would imply the the file came from (or through) a Windows system.

  • Been getting -bash: [export: command not found

    I have no idea how to fix this. Any help is appreciated. Here is the complete error I get when I open up terminal:
    Last login: Thu Mar 14 15:28:54 on ttys000
    -bash: [export: command not found
    Ways-MacBook-Pro:~ Way$

    In your bash initialization file you have a command
         [export
    however there is no command '[export' (open square bracked export)
    Look for a file by the name
    .bash_profile
    .bash_login
    .profile
    .bashrc
    and see which one of those files has a command that starts with [ followed by the letters e x p o r t
    Chance are it is suppose to be just 'export' without the open square bracket.

  • -bash: ssh: command not found = no ssh?

    Hi all,
    Sorry if this isn't the right category - this seemed to be the best fit.
    I'm having trouble with SSH.
    I've used ssh in the past (back when I was running Leopard) but I've never had all that much use for it. Today, however, I opened up terminal to SSH to an iMac on my local network, and got the following back:
    -bash: ssh: command not found
    Having a look around on the internet, somebody else said that they got this message but was still able to see the SSH manual by typing ssh man. However, when I tried this I just got "command not found" again.
    Any ideas?
    Thanks in advance,
    BrutalSpoon.

    Do you remember if you modified .profile or .bash_profile when you installed mysql?
    I guess you could search for the file that has the modification
    /usr/bin/grep /usr/local/mysql/bin $HOME/.[a-z]*
    Once you find the file, edit that file and put a dollar sign infront of PATH
    /usr/bin/nano /name/of/file/with/mysql/bin/in/it
    The entry you want to fix most likely looks like
    export PATH=PATH:/usr/local/mysql/bin
    you want to change this to
    export PATH=$PATH:/usr/local/mysql/bin
    The problem is the missing dollar sign $ which would cause the current PATH to be substituted before the addition of /usr/local/mysql/bin.
    Once the change is made, quit Terminal and relaunch it. The corrected PATH should now work.
    NOTE: If you do not want to use nano you could use TextWrangler (via File -> Open Hidden...), or Smultron (via File -> Open Hidden...). You should be able to find these GUI based text editors via <http://versiontracker.com>.
    Good luck.

  • ORACLE_HOME disappeared, SQLPLUS - bash: sqlplus: command not found

    OK, I am a newbie but am having real difficulty with my 10G DB which I had set up on Unix Solaris box but someone was messing around with it and now I can't see ORACLE_HOME, ORACLE_BASE and ORACLE_SID, they all return blank when I try to "echo" each.
    I realise I should have originally set it in Bash_profile, but is now too late.
    So how do I set them back up, I cannot get SQLPLUS / AS SYSDBA.........bash: sqlplus: command not found
    I have tried to reset and export but still doesn't work.
    I got the ORACLE_BASE as:
    training:/export/home/training/product/10.2.0/Db_1:N
    but can't seem to set the three variables to run SQLPLUS, any ideas what I am doing wrong?
    Tried messing around to reset but nothing works, this is the present state of affairs:
    env
    SSH_TTY=/dev/pts/3
    USER=training
    ORACLE_SID=training
    ORACLE_BASE=/oracle/app
    PATH=/usr/sbin:/usr/bin
    PWD=/export/home/training/product/10.2.0/Db_1/bin
    TZ=Eire
    PS1=\e[33m\h\e[31m-\u-\e[33m\W/\e[31m-$\e[32m
    SHLVL=3
    HOME=/export/home/training
    LOGNAME=training
    ORACLE_HOME=/oracle/app/product/10.2.0
    Can someone help me, really need a step by step guide to set these back up properly.
    Thanks

    just retyped the last one correctly:
    find / -name sqlplus -ls
    find: cannot read dir /var/lib/gdm: Permission denied
    find: cannot read dir /var/lib/log/gdm: Permission denied
    find: cannot read dir /var/mysql: Permission denied
    find: cannot read dir /var/dt/sdtlogin: Permission denied
    find: cannot read dir /var/core: Permission denied
    find: cannot read dir /var/run/smc898: Permission denied
    find: cannot read dir /var/spool/clientmqueue: Permission denied
    find: cannot read dir /var/spool/mqueue: Permission denied
    find: cannot read dir /var/fm/fmd/rsrc: Permission denied
    find: cannot read dir /var/fm/fmd/ckpt: Permission denied
    find: cannot read dir /var/fm/fmd/xprt: Permission denied
    find: cannot read dir /var/postgres/8.2/data: Permission denied
    find: cannot read dir /var/postgres/8.2/backups: Permission denied
    find: cannot read dir /var/sma_snmp: Permission denied
    find: cannot read dir /var/tmp/gconfd-root: Permission denied
    find: cannot read dir /var/tmp/orbit-root: Permission denied
    find: cannot read dir /var/krb5/rcache/root: Permission denied
    find: cannot read dir /var/opt/SUNWjass/run/20091012152456: Permission denied
    find: cannot read dir /.gconf: Permission denied
    find: cannot read dir /opt/SUNWlwact/misc/: Permission denied
    find: cannot read dir /opt/SUNWlwact/sdk/: Permission denied
    find: cannot read dir /opt/SUNWlwact/xsl/: Permission denied
    find: cannot read dir /opt/SUNWlwact/svc/: Permission denied
    find: cannot read dir /opt/SUNWlwact/man/: Permission denied
    find: cannot read dir /.sunw: Permission denied
    199411 1 -rw-r--r-- 1 training other 0 Jan 14 23:12 /export/home/training/sqlplus
    172460 2 drwxr-x--- 9 training other 9 Oct 27 17:58 /export/home/training/product/10.2.0/Db_1/sqlplus
    188055 10 -rwxr-x--x 1 training other 8776 Oct 27 18:00 /export/home/training/product/10.2.0/Db_1/bin/sqlplus
    184787 2 drwxr-x--- 3 training other 3 Oct 27 17:58 /export/home/training/product/10.2.0/Db_1/inventory/Templates/sqlplus
    184842 2 drwxr-x--- 3 training other 3 Oct 27 17:58 /export/home/training/product/10.2.0/Db_1/oc4j/j2ee/oc4j_applications/applications/isqlplus/isqlplus/WEB-INF/classes/oracle/sqlplus
    find: cannot read dir /root: Permission denied
    find: cannot read dir /proc/227: Permission denied
    find: cannot read dir /proc/832: Permission denied
    find: cannot read dir /proc/835: Permission denied
    find: cannot read dir /proc/458: Permission denied
    find: cannot read dir /proc/381: Permission denied
    find: cannot read dir /proc/624: Permission denied
    find: cannot read dir /proc/818: Permission denied
    find: cannot read dir /proc/2221: Permission denied
    find: cannot read dir /proc/290: Permission denied
    find: cannot read dir /proc/1166: Permission denied
    find: cannot read dir /proc/273: Permission denied
    find: cannot read dir /proc/229: Permission denied
    find: cannot read dir /proc/225: Permission denied
    find: cannot read dir /proc/478: Permission denied
    find: cannot read dir /proc/445: Permission denied
    find: cannot read dir /proc/815: Permission denied
    find: cannot read dir /proc/410: Permission denied
    find: cannot read dir /proc/432: Permission denied
    find: cannot read dir /proc/440: Permission denied
    find: cannot read dir /proc/427: Permission denied
    find: cannot read dir /proc/352: Permission denied
    find: cannot read dir /proc/443: Permission denied
    find: cannot read dir /proc/1352: Permission denied
    find: cannot read dir /proc/406: Permission denied
    find: cannot read dir /proc/2353: Permission denied
    find: cannot read dir /proc/670: Permission denied
    find: cannot read dir /proc/667: Permission denied
    find: cannot read dir /proc/405: Permission denied
    find: cannot read dir /proc/213: Permission denied
    find: cannot read dir /proc/16953: Permission denied
    find: cannot read dir /proc/1146: Permission denied
    find: cannot read dir /proc/2580: Permission denied
    find: cannot read dir /proc/27831: Permission denied
    find: cannot read dir /proc/444: Permission denied
    find: cannot read dir /proc/1338: Permission denied
    find: cannot read dir /proc/1350: Permission denied
    find: cannot read dir /usr/lib/cc-cfw: Permission denied
    find: cannot read dir /usr/aset: Permission denied
    find: cannot read dir /.gconfd: Permission denied
    find: cannot read dir /etc/flash/precreation: Permission denied
    find: cannot read dir /etc/flash/preexit: Permission denied
    find: cannot read dir /etc/flash/postcreation: Permission denied
    find: cannot read dir /etc/inet/secret: Permission denied
    find: cannot read dir /etc/apache/ssl.key: Permission denied
    find: cannot read dir /etc/sfw/openssl/private: Permission denied
    find: cannot read dir /etc/sfw/private: Permission denied
    find: cannot read dir /etc/webmin: Permission denied
    Looks a bit better:
    199411 1 -rw-r--r-- 1 training other 0 Jan 14 23:12 /export/home/training/sqlplus
    172460 2 drwxr-x--- 9 training other 9 Oct 27 17:58 /export/home/training/product/10.2.0/Db_1/sqlplus
    188055 10 -rwxr-x--x 1 training other 8776 Oct 27 18:00 /export/home/training/product/10.2.0/Db_1/bin/sqlplus
    184787 2 drwxr-x--- 3 training other 3 Oct 27 17:58 /export/home/training/product/10.2.0/Db_1/inventory/Templates/sqlplus
    184842 2 drwxr-x--- 3 training other 3 Oct 27 17:58 /export/home/training/product/10.2.0/Db_1/oc4j/j2ee/oc4j_applications/applications/isqlplus
    How to I run the sqlplus?

  • -bash: then : command not found

    Hi
    Sorry i have post the same problem in Infrastruture but i am not getting a quick reply.Thats why i am posting this in the database thread.
    I have installed OEL 5.I am going to install Oracle 11g.I have configured Kernel for oracle.But now when give the command su - oracle there is an
    -bash: then : command not found
    -bash: : command not found
    When i give su - then also same these lines appear.Please send me a solution.
    Will this give nay problem in database installation
    Regards
    Bobby

    user12119634(bobs) wrote:
    Hi
    Sorry i have post the same problem in Infrastruture but i am not getting a quick reply.Thats why i am posting this in the database thread.
    I have installed OEL 5.I am going to install Oracle 11g.I have configured Kernel for oracle.But now when give the command su - oracle there is an
    -bash: then : command not found
    -bash: : command not found
    When i give su - then also same these lines appear.Please send me a solution.
    Will this give nay problem in database installation
    Regards
    BobbyTry
    export PATH=/bin:$PATHthen do again

  • Bash: SQLPLUS: Command not found

    Hi All,
    I'm facing problem during connecting to SQLPLUS in Linux Plateform Redhat 4.....whenever I write SQLPLUS, it gives me the following Error message
    Bash: Sqlplus: Command not found.
    kindly let me know, how can I get rid of this Error. Thanks
    Regards,
    Imran

    Your environmentals are not setup.
    From the command prompt source oraenv
    ~> . oraenv
    or (depending on your os )
    ~> source oraenv
    Respond to the prompt with the name of your database exactly (uppercase/lowercase) as it is in the oratab file (/etc/oratab ?)
    This will set your ORACLE_HOME, ORACLE_SID, and PATH variables correctly for your database.
    Try sqlplus again and see if that does not work for you.

  • Bash: chkconfig: command not found

    Hi,
    I have made a a file dbora and made an entry in the /etc/init.d
    (The file basically does the Automatic Oracle Startup)
    I have created a dbora file
    I have then made the :$chmod 750 /etc/init.d/dbora
    Then $chconfig -level 345 dbora on
    Then its throwing error :bash:chkconfig: command not found
    I have logged in as root:
    $whereis chkconfig
    its shwoing :chkconfig: /sbin/chkconfig
    I tried also the same but not working
    Kindly can anyone help me on this

    uuh...ohhh...the answer to this question can be found at any fuckin bullshit linux documentation?!? so why don't you flame this guy for rtfm questions like the others for asking questions which can be googled for? Well Mr ASCORBINE why doesn't your post contain a link like http://lmgtfy/?q=command+not+found ?!? Actually the FIRST hit to this query got me to the solution, so if you are that wizard you pretend to be why didn't you rtmf him?!? Nah you seem to be another forum troll like others who is upset by himself for being a smartass....

  • Java -version bash: java: command not found

    Hi all.
    I wanna install java on linux (OpenSUSE). When I checked java -version, it shown that :
    java -version
    bash: java: command not found
    Can any solution about it, please!

    Sukirmanster wrote:
    I wanna install java on linux (OpenSUSE). When I checked java -version, it shown that :
    java -version
    bash: java: command not foundNot surprising if you have not installed java yet.
    Can any solution about it, please!If you have installed java, read a unix/linux manual,
    pay particular attention to bash (or any shell) and the role of $PATH.

  • Type "purge" in Terminal and get:   -bash: purge: command not found   Is there another built-in command to clear memory leaks?   want to clear memory periodically

    I have 10.6.8.  When I type "purge" in Terminal I get:   -bash: purge: command not found   Is there another built-in command to clear memory leaks?   I have FreeMemory (works well) and considering FreeMemory Pro, to clear memory periodically, say every 20 minutes, or preferably when a threshold is reached, say when only 100MB is available.

    To get purge to work you need to install Xcode from Optional Installs on the 10.6 install DVD. Also be sure you install CHUD Tools with it.
    But running purge or anything like it is pointless if within a short period of time the VM just grows back again. Sounds like you need more RAM.
    Where are the memory leaks? Just because the VM reaches a certain size doesn't necessarily mean it's from a memory leak.

  • -bash: gcc_select: command not found

    HI
    I am try to compile the Darwin kernel 9.8 on my system according this page https://developer.apple.com/library/mac/#documentation/Darwin/Conceptual/KernelP rogramming/build/build.html
    but unfortunaly I get the error message
    -bash: gcc_select: command not found
    According to the manpage http://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/ 10.5/man1/powerpc-apple-darwin9-gcc-4.0.1.1.html
    In Apple's version of GCC, both cc and gcc are actually symbolic links to a compiler named like        gcc-version; which compiler is linked to may be changed using the command gcc_select.  Similarly, c++        and g++ are links to a compiler named like g++-version.
    but unfortunaly I didn´t got the command on my system
    can anybody help (sry for the bad english) if the is not enough information pls tell me
    System
    Macbook5.1
    Mac OS X 10.5.8
    Xcode 3.1.2
    Thank in advance

    Thank for the answer
    but unfurtunaly I can´t sign in to the developer Forum don´t know why
    I suggest that I have to pay $99/year to get access to Forum
    Developer Technical Support Incidents are only available to members of the iOS, Mac, and Safari Developer Programs.
    for a simple answer I am not ready to pay 99$ that is rip off fraud
    Welcome to Apple
    NO MONEY get out of here
    realy sad
    Hope that someone can help me with my issue how to get the gcc_select or how to change the gcc
    cheers

  • -bash: make: command not found

    Help me please. I downloaded cdrecord because I need a tool called makeisofs but I am told that I need to compile it first before I can use it. The directions say to type "make" to compile it but when I type make in the terminal window, I get the following message:
    -bash: make: command not found
    I've spent hours looking all over the web for an explanation but I just can not find anything to help me. I even joined some IRC channels but no one types anything in those rooms. It is the weirdest thing.
    Can anyone tell me why I can't compile? The directions I got with the download don't explain a thing.

    I found something that might help. On the second Leopard DVD, there is something called Xcode Tools which I am told has what I need. I'll respond if I have any other questions. Thanks for reading.

  • (OEL 4.7) -bash: sqlplus: command not found after install of 10g R2

    Hi all
    I'm new to Linux and I would like your help and directions on a few things:
    After 2 days of battle with RPM's (i386 vs x86_64) i was finally able to install 10g R2 on OEL 4.7 x86_64 system without any errors.
    please check if all these settings are correct and help me how to start sqlplus? or create a database with dbca
    I followed all the directions in Doc ID: 339510.1.
    During installation i choose this path as the ORACLE_HOME
    /u01/app/oracle/product/10.2.0/
    I did not however installed the default database.
    I then ran the two scripts at the end of the installation as root.
    Here are my settings:
    oracle bash_profile:
    # .bash_profile
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi
    # User specific environment and startup programs
    PATH=$PATH:$HOME/bin
    export PATH
    unset USERNAME
    :q
    ORACLE_BASE=/u01/app/oracle
    export ORACLE_BASE
    ORACLE_HOME=/product/10.2.0/db_1;
    export ORACLE_HOME
    export PATH=$ORACLE_HOME/bin:$PATH
    here is my oracle env result
    [oracle@nycoralp01 /]$ env | grep -i ORACLE
    OLDPWD=/home/oracle/oraInventory
    USER=oracle
    ORACLE_BASE=/u01/app/oracle
    MAIL=/var/spool/mail/oracle
    PATH=/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin
    HOME=/home/oracle
    LOGNAME=oracle
    ORACLE_HOME=/product/10.2.0/db_1
    here is my echo $ORACLE_HOME result:
    [oracle@nycoralp01 /]$ echo $ORACLE_HOME
    /product/10.2.0/db_1
    Can someone please tell me what did i miss or did not set?
    When i try to run sqlplus i get this error
    [oracle@nycoralp01 /]$ sqlplus
    -bash: sqlplus: command not found
    Any help appreciated

    I change it in my bash_profile
    $ vi ~oracle/.bash_profile
    # .bash_profile
    # Get the aliases and functions
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi
    # User specific environment and startup programs
    PATH=$PATH:$HOME/bin
    export PATH
    unset USERNAME
    :q
    ORACLE_BASE=/u01/app/oracle
    export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;
    export ORACLE_HOME
    export PATH=$ORACLE_HOME/bin:$PATH
    and i'm still getting the same error
    -bash: sqlplus: command not found
    Is there anything else i'm missing? do i have to restart anything?

Maybe you are looking for

  • Global temp table usage obstructed by FND SRWINIT

    Hi Friends, I am using a Global temporary table in one of my Oracle reports which is being populated in After-Param-Form trigger. But the problem I am facing is if I use the SRW.USER_EXIT('FND SRWINIT') in the Before-Report trigger, the records in Gl

  • Elements 12 updates

    The advice from Barbara B. did not work as the only thing running in task manager was the update . Once this reaches 13% (Camera Raw 8.3...) it asks for the application ElementsAutoAnalizer.exe to be closed to continue. How can this be done?

  • Upgrade to new Extreme, old Express no longer recognized.

    Original setup: 2009 iMac (Mavericks), Airport Extreme (A1143), Airport Express (A1264-extending range).  All worked fine, and worked equally well on new iMac retina (Yosemite). Upgraded to Airport Extreme 802.11ac (A1521) on the retina iMac.  Works

  • Port based routing?

    Hi, My Mac connects to Internet through ADSL router, and to a PPTP-VPN host through this connection. And I want to FORCE all my http/https connections(that use destination port 80, 443, and perhaps some more) to use the VPN, while keep anything else

  • Junk Filtering Doesn't Function As Described

    I'm trying to comprehend how junk filtering works. I've tried setting it so that it will allow all messages from parties in my address book, or previous recipients, or those who send e-mails to my complete address, and then a list of all the words I