Color in BASH?

How do you turn on color in BASH on Solaris 10? On the Mac you set CLICOLOR=1.
How is this done in Solaris?
Thanks.

May or may not be worth it. You will need to get the GNU commands to get color on file lists and the like. I tried for a little while but eventually just kept it stock. You can get color in VI by using gnu vim enhanced and editing the .vimrc file and using syntax files.

Similar Messages

  • [SOLVED] Bash changes consolle's colors by itself

    Hi archers,
    I've wrote a little script which ask for the result of a given random moltiplication because I was exercising with $RANDOM and something strange's happend.
    No matter where I am (Tty, Tmux, Urxvt, Xterm...) Bash changes consolle's colors by itself if I do ^c to stop the script, instead of write a reply.
    i.e.'s:
    correct behaviour
    $ 8 * 9 = ?
    $ 72
    $ ls
    file in red file in yellow file in grey...
    Wrong behaviour
    $ 8 *9 = ?
    $ ^c
    $ ls
    file in blue file in green file in white...
    What the heck?
    Bash version is 4.2.39(2)-release.
    The script is the following:
    while :
    do
    min="3"
    max="7"
    fat1="$(($RANDOM%$max+$min))"
    fat2="$(($RANDOM%$max+$min))"
    prod="$(($fat1*$fat2))"
    echo "$fat1 * $fat2 = ?"
    read res
    while [ "$res" != "$prod" ]
    do
    echo "$prod"
    echo "Insert the correct result."
    tavPit
    done
    return 0
    done
    Everything is up to date.
    .bashrc
    [[ $- != *i* ]] && return
    complete -cf sudo
    [ -f /etc/bash_completion ] && ! shopt -oq posix && . /etc/bash_completion
    [ -f ~/.bash/include ] && . ~/.bash/include
    [ -e "$HOME"/.dircolors ] && eval $(dircolors -b "$HOME"/.dircolors)
    include
    #!/bin/bash
    [ -f ~/.bash/alias ] && . ~/.bash/alias
    [ -f ~/.bash/color ] && . ~/.bash/color
    [ -f ~/.bash/export ] && . ~/.bash/export
    [ -f ~/.bash/shopt ] && . ~/.bash/shopt
    [ -f ~/.bash/stty ] && . ~/.bash/stty
    [ -f ~/.bash/set ] && . ~/.bash/set
    color
    nc="\e[0m"
    nbk="\e[0;30m"
    nre="\e[0;31m"
    ngr="\e[0;32m"
    nye="\e[0;33m"
    nbl="\e[0;34m"
    nma="\e[0;35m"
    ncy="\e[0;36m"
    nwh="\e[0;37m"
    bbk="\e[1;30m"
    bre="\e[1;31m"
    bgr="\e[1;32m"
    bye="\e[1;33m"
    bbl="\e[1;34m"
    bma="\e[1;35m"
    bcy="\e[1;36m"
    bwh="\e[1;37m"
    end="\[\e[m\]"
    man() {
    env \
    LESS_TERMCAP_mb=$(printf "\e[0;32m") \
    LESS_TERMCAP_md=$(printf "\e[0;32m") \
    LESS_TERMCAP_me=$(printf "\e[0m") \
    LESS_TERMCAP_se=$(printf "\e[0m") \
    LESS_TERMCAP_so=$(printf "\e[1;31m") \
    LESS_TERMCAP_ue=$(printf "\e[0m") \
    LESS_TERMCAP_us=$(printf "\e[1;33m") \
    man "${@}"
    if [ "$TERM" = "linux" ]; then
    echo -en "\e]P0000000" # Black.
    echo -en "\e]P9ff0000" # Red.
    echo -en "\e]PA00ff00" # Green.
    echo -en "\e]PBffff00" # Yellow.
    echo -en "\e]PC2b4f98" # Blue.
    echo -en "\e]PDff00ff" # Magenta.
    echo -en "\e]PE00ffff" # Cyan.
    echo -en "\e]PFffffff" # White.
    clear
    fi
    .dircolors
    TERM linux
    TERM linux+utf8
    TERM rxvt-unicode
    TERM rxvt-unicode-256color
    TERM screen
    TERM screen-256color
    TERM xterm
    TERM putty
    EIGHTBIT 1
    NORMAL 01;30
    FILE 01;30
    DIR 31
    LINK 36
    FIFO 03;33
    SOCK 03;33
    DOOR 32
    BLK 32
    CHR 32
    ORPHAN 05;33
    EXEC 33
    .tar 31
    .tgz 31
    .arj 31
    .taz 31
    .lzh 31
    .zip 31
    .7z 31
    .z 31
    .Z 31
    .gz 31
    .bz2 31
    .deb 31
    .rpm 31
    .jar 31
    .rar 31
    .xz 31
    .jpg 35
    .jpeg 35
    .gif 35
    .bmp 35
    .pbm 35
    .pgm 35
    .ppm 35
    .tga 35
    .xbm 35
    .xpm 35
    .tif 35
    .tiff 35
    .png 35
    .fli 35
    .gl 35
    .dl 35
    .xcf 35
    .xwd 35
    .pdf 35
    .ogg 34
    .mp3 34
    .wav 34
    .mov 34
    .mpg 34
    .mpeg 34
    .asf 34
    .avi 34
    .mkv 34
    .wmv 34
    .ogm 34
    .C 37
    .H 37
    .c 37
    .h 37
    .cxx 37
    .hxx 37
    .cpp 37
    .hpp 37
    .py 37
    .sh 37
    .vim 37
    .o 37
    .so 37
    .a 37
    .ko 37
    .rc 36
    *rc 36
    Thanks a lot.
    Last edited by rix (2012-11-26 15:38:28)

    Bandit Bowman wrote:My colours are unaffected after running the function. [...]
    Here colors change when I send SIGINT to a running instance of my script; as said before.
    Bandit Bowman wrote:[...] What does $LS_COLORS look like before and after? [...]
    When everything is working right:
    $ echo $LS_COLORS
    $ no=01;30:fi=01;30:di=31:ln=36:pi=03;33:so=03;33:do=32:bd=32:cd=32:or=05;33:ex=33:
    *.tar=31:*.tgz=31:*.arj=31:*.taz=31:*.lzh=31:*.zip=31:*.7z=31:*.z=31:*.Z=31:*.gz=31:
    *.bz2=31:*.deb=31:*.rpm=31:*.jar=31:*.rar=31:*.xz=31:*.jpg=35:*.jpeg=35:*.gif=35:
    *.bmp=35:*.pbm=35:*.pgm=35:*.ppm=35:*.tga=35:*.xbm=35:*.xpm=35:*.tif=35:*.tiff=35:
    *.png=35:*.fli=35:*.gl=35:*.dl=35:*.xcf=35:*.xwd=35:*.pdf=35:*.ogg=34:*.mp3=34:
    *.wav=34:*.mov=34:*.mpg=34:*.mpeg=34:*.asf=34:*.avi=34:*.mkv=34:*.wmv=34:*.ogm=34:
    *.C=37:*.H=37:*.c=37:*.h=37:*.cxx=37:*.hxx=37:*.cpp=37:*.hpp=37:*.py=37:*.sh=37:
    *.vim=37:*.o=37:*.so=37:*.a=37:*.ko=37:*.rc=36:*rc=36:
    When texts change color (the strange behaviour):
    $ echo $LS_COLORS
    $
    Bandit Bowman wrote:[...] Is this the whole script or just a snippet [...]
    Whole.
    Bandit Bowman wrote:[...] because I don't see anything that should modify it. [...]
    That's why I'm asking.
    Bandit Bowman wrote:[...] here's a slightly more straightforward version [...]
    Thanks, I've learnt something.
    Bandit Bowman wrote:[...] although it won't help with the colours.
    Thanks for the reply anyway.
    Bandit Bowman wrote:[...] English: [...]
    Also, many thanks again.
    Edit: solved. "$LS_COLORS" must be set if you want colors.
    Last edited by rix (2012-11-26 15:38:06)

  • Colored Bash

    Hey. So right now in my .bashrc I'm using the following lines to color my bash prompt:
    PS1='\[\e[1;35m\]\u\[\e[m\] \[\e[1;34m\]\W\[\e[m\] \[\e[1;31m\]> \[\e[0;37m\]'
    PS2='>'
    so my normal text atm is white, but I'd really love to have it just as my default system text color. The problem is if I reset it with 'tput sgr0' then I have some strange problems. any other way to reset it?

    Stythys wrote:
    Hey. So right now in my .bashrc I'm using the following lines to color my bash prompt:
    PS2='>'
    so my normal text atm is white, but I'd really love to have it just as my default system text color. The problem is if I reset it with 'tput sgr0' then I have some strange problems. any other way to reset it?
    PS1='\[\e[1;35m\]\u\[\e[m\] \[\e[1;34m\]\W\[\e[m\] \[\e[1;31m\]> \[\e[0;37m\]'
                                                                                                            ^--------^ This part is turning it white.
    What color do you want it?

  • "Bash"ing my head into wall (pun intended)

    How do I get colour in the terminal, I added alias ls='ls --color' to .bashrc and .bash_profile like I would in Linux, but nothing. I cannot even have it use colour on the command line with ls --color. Bash is bash, so I assume there is a way to do this on mac too. Or do I have to do something like recompile ls with colour support?

    If your Terminal is not set to xterm-color but to VT102/VT100 (which is, what I prefer), your chances are near 0 to get coloured output unless you build your own ls command.

  • Patch install problem in Solaris 10

    {color:#3366ff}Hi , I am trying to install patch 125100-10 to meet the requirement of our application system.But there seems something wrong. {color}
    bash-3.00# showrev -p | grep {color:#ff0000}125100{color}
    Patch: 120011-14 Obsoletes: 116781-02, 117447-01, 117463-05, 118371-10, 118373-01, 118564-03, 118731-01, 118879-02, 118890-03, 118925-05, 118929-05, 119012-03, 119073-03, 119077-10, 119265-02, 119332-01, 119336-01, 119573-02, 119580-05, 119586-02, 119593-01, 119685-11, 119824-02, 119826-02, 119981-09, 119985-02, 119998-02, 120023-01, 120032-04, 120048-03, 120050-06, 120469-07, 120473-12, 120629-08, 120780-04, 120809-01, 120824-09, 120845-05, 120990-02, 120998-02, 121006-02, 121010-06, 121215-01, 121229-02, 121235-01, 121278-01, 121282-02, 121284-02, 121288-03, 121292-01, 121294-01, 121406-01, 121473-01, 121474-01, 121476-01, 121478-01, 121786-01, 121905-01, 122251-01, 122328-01, 122404-01, 122412-01, 122513-02, 122535-01, 122637-01, 122646-02, 122658-04, 122660-10, 122662-05, 122752-04, 123017-01, 123249-02, 123256-02, 123324-03, 123330-01, 123350-01, 123354-03, 123356-02, 123362-01, 123418-02, 123420-02, 123422-03, 123441-05, 123444-01, 123910-03, 123911-01, 123916-05, 123954-01, 124204-04, 124208-01, 124250-03, 124254-04, 124258-07, 124280-01, 124286-01, 124327-04, 124442-01, 124916-03, 124918-02, 124921-02, 124922-03, 124987-02, 124990-01, 124993-01, 124995-01, 125009-01, 125011-01, 125014-03, 125018-02, 125020-01, 125024-01, 125026-01, 125028-03, 125035-01, 125040-01, 125042-02, 125073-01, 125077-03, 125079-01, {color:#ff0000}125100-10{color}, 125112-01, 125114-01, 125116-02, 125118-01, 125120-03, 125123-01, 125127-01, 125129-01, 125198-02, 125203-01, 125329-03, 125363-06, 125371-01, 125383-01, 125385-02, 125420-01, 125422-01, 125424-01, 125427-01, 125430-01, 125432-01, 125465-02, 125478-01, 125486-01, 125488-02, 125492-01, 125494-02, 125497-01, 125792-01, 125795-01, 126255-01, 126303-02, 126310-01, 126320-01, 126429-01, 126536-01, 126663-01, 126838-01 Requires: 118833-36, 118918-24, 119042-09, 119254-42, 119574-02, 119578-30, 120272-12, 120900-04, 121133-02, 121901-01, 122640-05, 125369-05, 125503-02, 125547-01, 126419-01, 126897-02 Incompatibles: Packages: SUNWcsu, SUNWcsr, SUNWcsl, SUNWcnetr, SUNWkvm, SUNWcar, SUNWcakr, SUNWckr, SUNWcsd, SUNWcpcu, SUNWfmd, SUNWperl584core, SUNWperl584usr, SUNWesu, SUNWkrbu, SUNWmdb, SUNWmdbr, SUNWtoo, SUNWpiclu, SUNWcslr, SUNWaudit, SUNWib, SUNWusb, SUNWtavor, SUNWudapltu, SUNWudapltr, SUNWzfskr, SUNWzfsr, SUNWsmapi, SUNWzfsu, SUNWdoc, SUNWuksp, SUNWopenssl-libraries, SUNWwbsup, SUNWses, SUNWssad, SUNWuprl, SUNWusbu, SUNWmdr, SUNWmdu, SUNWintgige, SUNWipfh, SUNWipfr, SUNWipfu, SUNWnfsckr, SUNWnfscu, SUNWvolu, SUNWpapi, SUNWippcore, SUNWipplr, SUNWipplu, SUNWrcmdc, SUNWscpu, SUNWbcp, SUNWxcu4, SUNWxge, SUNWixgb, SUNWpl5u, SUNWbtool, SUNWarc, SUNWarcr, SUNWnfssu, SUNWdhcsu, SUNWdhcm, SUNWpmu, SUNWdmgtu, SUNWnisu, SUNWypu, SUNWzoner, SUNWatfsu, SUNWpoolr, SUNWpool, SUNWtecla, SUNWzoneu, SUNWauda, SUNWaudh, SUNWbart, SUNWcpc, SUNWcpr, SUNWpppdu, SUNWfruip, SUNWdtrc, SUNWkdcu, SUNWkey, SUNWpcu, SUNWppm, SUNWpsu, SUNWdfbh, SUNWlibsasl, SUNWlldap, SUNWdtrp, SUNWerid, SUNWhea, SUNWfss, SUNWsadmi, SUNWftdur, SUNWftduu, SUNWncar, SUNWntpu, SUNWrcapr, SUNWopenssl-include, SUNWpsm-lpd, SUNWqos, SUNWrcapu, SUNWrge, SUNWroute, SUNWslpu, SUNWsndmr, SUNWsndmu, SUNWsra, SUNWsshcu, SUNWsshdu, SUNWsshu
    {color:#3366ff}From the above information, it tells me, the 125100-10 is an old one and is replaced by 120011-14.
    First, I downlaod the patch and unpack it under /var/tmp
    bash-3.00# patchadd 125100-10
    Validating patches...
    Loading patches installed on the system...
    Done!
    Loading patches requested to install.
    Version of package SUNWcakr from directory SUNWcakr.v in patch 125100-10 differs from the package installed on the system.
    Version of package SUNWcakr from directory SUNWcakr.us in patch 125100-10 differs from the package installed on the system.
    Version of package SUNWkvm from directory SUNWkvm.us in patch 125100-10 differs from the package installed on the system.
    Done!
    The following requested patches have packages not installed on the system
    Package SUNWdcsr from directory SUNWdcsr in patch 125100-10 is not installed on the system. Changes for package SUNWdcsr will not be applied to the system.
    Package SUNWdcsu from directory SUNWdcsu in patch 125100-10 is not installed on the system. Changes for package SUNWdcsu will not be applied to the system.
    Package SUNWdrcr from directory SUNWdrcr.u in patch 125100-10 is not installed on the system. Changes for package SUNWdrcr will not be applied to the system.
    Package SUNWdrr from directory SUNWdrr.u in patch 125100-10 is not installed on the system. Changes for package SUNWdrr will not be applied to the system.
    Package SUNWdscpr from directory SUNWdscpr.u in patch 125100-10 is not installed on the system. Changes for package SUNWdscpr will not be applied to the system.
    Package SUNWefc from directory SUNWefc.u in patch 125100-10 is not installed on the system. Changes for package SUNWefc will not be applied to the system.
    Package SUNWefcl from directory SUNWefcl in patch 125100-10 is not installed on the system. Changes for package SUNWefcl will not be applied to the system.
    Package SUNWsckmr from directory SUNWsckmr in patch 125100-10 is not installed on the system. Changes for package SUNWsckmr will not be applied to the system.
    Package SUNWdrr from directory SUNWdrr.us in patch 125100-10 is not installed on the system. Changes for package SUNWdrr will not be applied to the system.
    Package SUNWefc from directory SUNWefc.us in patch 125100-10 is not installed on the system. Changes for package SUNWefc will not be applied to the system.
    Package FJSVcpcu from directory FJSVcpcu in patch 125100-10 is not installed on the system. Changes for package FJSVcpcu will not be applied to the system.
    Package FJSVhea from directory FJSVhea in patch 125100-10 is not installed on the system. Changes for package FJSVhea will not be applied to the system.
    Package FJSVmdb from directory FJSVmdb in patch 125100-10 is not installed on the system. Changes for package FJSVmdb will not be applied to the system.
    Package FJSVmdbr from directory FJSVmdbr in patch 125100-10 is not installed on the system. Changes for package FJSVmdbr will not be applied to the system.
    Checking patches that you specified for installation.
    Done!
    {color}
    {color:#000000}
    The following requested patches will not be installed because
    they have been made obsolete by other patches already
    installed on the system or by patches you have specified for installation.
    0 All packages from patch 125100-10 are patched by higher revision patches.
    {color}
    No patches to install.
    {color:#000000}
    {color}{color:#3366ff}Then I tried to install the new patch 120011-14 {color}
    {color:#000000}
    bash-3.00# patchadd 120011-14
    Validating patches...
    Loading patches installed on the system...
    Done!
    Loading patches requested to install.
    Version of package SUNWcakr from directory SUNWcakr.v in patch 120011-14 differs from the package installed on the system.
    Version of package SUNWcar from directory SUNWcar.v in patch 120011-14 differs from the package installed on the system.
    Version of package SUNWcpc from directory SUNWcpc.v in patch 120011-14 differs from the package installed on the system.
    Version of package SUNWkvm from directory SUNWkvm.v in patch 120011-14 differs from the package installed on the system.
    Version of package SUNWcakr from directory SUNWcakr.us in patch 120011-14 differs from the package installed on the system.
    Version of package SUNWcar from directory SUNWcar.us in patch 120011-14 differs from the package installed on the system.
    Version of package SUNWcpc from directory SUNWcpc.us in patch 120011-14 differs from the package installed on the system.
    Version of package SUNWkvm from directory SUNWkvm.us in patch 120011-14 differs from the package installed on the system.
    Done!
    The following requested patches have packages not installed on the system
    Package SUNWcart200 from directory SUNWcart200.v in patch 120011-14 is not installed on the system. Changes for package SUNWcart200 will not be applied to the system.
    Package SUNWcti2 from directory SUNWcti2.u in patch 120011-14 is not installed on the system. Changes for package SUNWcti2 will not be applied to the system.
    Package SUNWdcsr from directory SUNWdcsr in patch 120011-14 is not installed on the system. Changes for package SUNWdcsr will not be applied to the system.
    Package SUNWdcsu from directory SUNWdcsu in patch 120011-14 is not installed on the system. Changes for package SUNWdcsu will not be applied to the system.
    Package SUNWdrcr from directory SUNWdrcr.u in patch 120011-14 is not installed on the system. Changes for package SUNWdrcr will not be applied to the system.
    Package SUNWdrr from directory SUNWdrr.u in patch 120011-14 is not installed on the system. Changes for package SUNWdrr will not be applied to the system.
    Package SUNWdscpr from directory SUNWdscpr.u in patch 120011-14 is not installed on the system. Changes for package SUNWdscpr will not be applied to the system.
    Package SUNWefc from directory SUNWefc.u in patch 120011-14 is not installed on the system. Changes for package SUNWefc will not be applied to the system.
    Package SUNWefcl from directory SUNWefcl in patch 120011-14 is not installed on the system. Changes for package SUNWefcl will not be applied to the system.
    Package SUNWefcr from directory SUNWefcr in patch 120011-14 is not installed on the system. Changes for package SUNWefcr will not be applied to the system.
    Package SUNWidn from directory SUNWidn.u in patch 120011-14 is not installed on the system. Changes for package SUNWidn will not be applied to the system.
    Package SUNWiopc from directory SUNWiopc.v in patch 120011-14 is not installed on the system. Changes for package SUNWiopc will not be applied to the system.
    Package SUNWkvmt200 from directory SUNWkvmt200.v in patch 120011-14 is not installed on the system. Changes for package SUNWkvmt200 will not be applied to the system.
    Package SUNWldomr from directory SUNWldomr.v in patch 120011-14 is not installed on the system. Changes for package SUNWldomr will not be applied to the system.
    Package SUNWldomu from directory SUNWldomu.v in patch 120011-14 is not installed on the system. Changes for package SUNWldomu will not be applied to the system.
    Package SUNWpcmci from directory SUNWpcmci in patch 120011-14 is not installed on the system. Changes for package SUNWpcmci will not be applied to the system.
    Package SUNWsckmr from directory SUNWsckmr in patch 120011-14 is not installed on the system. Changes for package SUNWsckmr will not be applied to the system.
    Package SUNWus from directory SUNWus.u in patch 120011-14 is not installed on the system. Changes for package SUNWus will not be applied to the system.
    Package SUNWust1 from directory SUNWust1.v in patch 120011-14 is not installed on the system. Changes for package SUNWust1 will not be applied to the system.
    Package SUNWwrsm from directory SUNWwrsm.u in patch 120011-14 is not installed on the system. Changes for package SUNWwrsm will not be applied to the system.
    Package SUNWdrr from directory SUNWdrr.us in patch 120011-14 is not installed on the system. Changes for package SUNWdrr will not be applied to the system.
    Package SUNWefc from directory SUNWefc.us in patch 120011-14 is not installed on the system. Changes for package SUNWefc will not be applied to the system.
    Package FJSVcpcu from directory FJSVcpcu in patch 120011-14 is not installed on the system. Changes for package FJSVcpcu will not be applied to the system.
    Package FJSVhea from directory FJSVhea in patch 120011-14 is not installed on the system. Changes for package FJSVhea will not be applied to the system.
    Package FJSVmdb from directory FJSVmdb in patch 120011-14 is not installed on the system. Changes for package FJSVmdb will not be applied to the system.
    Package FJSVmdbr from directory FJSVmdbr in patch 120011-14 is not installed on the system. Changes for package FJSVmdbr will not be applied to the system.
    Package FJSVpiclu from directory FJSVpiclu in patch 120011-14 is not installed on the system. Changes for package FJSVpiclu will not be applied to the system.
    The following requested patches are already installed on the system
    Requested to install patch 120011-14 is already installed on the system.
    No patches to check dependency.
    {color}
    {color:#000000}
    {color}
    {color:#3366ff}
    I really confused by the information given by the system.Anyone can help me with it. Thanks{color}
    Edited by: hubery on Jul 6, 2008 5:04 PM

    Patch 120011-14, which obsoletes patch 125100-10, is already installed on your system. Most likely no more actions needed from your side. If your software requires exactly patch 125100-10 and is not compatible with its successor, then you can try remove patch 120011-14.

  • Incremental Backup using "imsbackup"

    Dear every body,
    I have a trouble and need the help from you, please help me in this case if you can, thanks.
    I want to backup incrementally my mailboxes with "imsbackup" command. I have tested following below example but not succeeded:
    1. I send/receive email between 2 users in my domain at 08:00AM.
    2. I performed FULL backup the whole message store using imsbackup
    3. At 09:00AM I send/receive another email between 2 users in my domain
    4. I performed INCREMENTAL backup the whole message store using "imsbackup -d 20091217:083000....." but my backup file including the messages that I sent before 08:30AM
    I have done this several times and get the same result.
    Please kindly help me in this case, how can I use imsbackup to incrementally backup my mailboxes.
    Any help and advices from you is appreciated.
    Thanks all of you so much.
    huynq

    Hi Shane,
    Thanks so much for your response.
    The version of Messaging Server I am using is:
    {color:#ff0000}bash-3.00# ./imsimta version
    Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 9 2008){color}
    For your question:
    Does this problem occur if you incrementally back up a single mailbox e.g.
    ./imsbackup -d 20091217:083000 ... user/<uid>/
    My Answer is:
    I have not performed above step yet because I want to backup mailboxes of all users.
    For your question:
    Is the time/timezone set correctly on the server?
    My answer is:
    Yes, of courses. I already set time/timezone correctly. I also checked the time stamp of newly created email in message store in server, their date are correct.
    For your question:
    Are you in daylight savings time i.e. you shift the imsbackup incremental time back-forward an hour and get the correct result?
    My answer is:
    I already tried many times but got the same result. For example, At{color:#ff0000} 9AM Dec 16th 2009{color} I sent an email. At{color:#ff0000} 9AM one day later (Dec 17th 2009){color} I sent another email. I performed incremental backup using{color:#ff0000} "./imsbackup -d 20091216:120000 -f- / > /email_backup/incremental.120000".{color}
    The backup file I got contained the email I sent at 9AM Dec 16th.
    Any advice on this ?
    Anyway, thanks so much for your help. I am awaiting your response.
    huynq.

  • IPhone 5 proven faster than Galaxy SIII with benchmark tests!!!!!

    Thought this might be useful to people thinking about the iPhone 5---speed test AND real world drop tests!!! iPhone 5 zips past Galaxy SIII in Speed Test http://news.yahoo.com/iphone-5-zips-past-galaxy-iii-speed-test-132936436.html iPhone 5 Humiliates Galaxy SIII in Drop Test http://news.yahoo.com/iphone-5-humiliates-galaxy-iii-drop-test-video-154148011.html iPhone 5's A6 processor found to have a dual-core CPU, triple-core GPU http://news.yahoo.com/iphone-5-a6-processor-found-dual-core-cpu-220506025.html

    LOL...nothing...just been trying like hell to find some speed test..and stumbled across these plus the drop test....the phone is a pretty hot topic and thought that I would provide some objective facts rather than the normal colorful metaphor bashing that seems to be the norm on alot of forums.  Rather than just saying what I think, I think is more important to see and read objective facts and then let the viewer draw his or her own conclusion. 

  • [SOLVED]Color Bash Prompt help

    So I have been customizing my arch box and everything has been great except for one problem; the bash color prompt. I am kind of running a color screen where I am using the same shade of green, blues, grays, etc. I would like to continue that with my bash color prompt. However it seems to use some weird numbering system for its colors that I am not familiar with. I know that there is a way to use 256 colors, but I am not sure how.
    So for example I would like to have this shade of green from bash  0;32m' as this #87d75f  in html notation.
    Is there a way for this to be done? Thanks.
    Last edited by NoxSec (2011-07-15 20:52:08)

    The prompt inherits colours from those specified in .Xresources https://wiki.archlinux.org/index.php/Xresources

  • [SOLVED]Bash prompt colors different in console as opposed in terminal

    Hi
    EDIT: I have solved the problem by copying /etc/skel/.bash_profile to my home directory.
    Today i updated the system and the bash prompt is fine in my terminal (KDE Konsole or in Xterm) but not in consoles. For normal user (blue colors) i use this settings in the $HOME/.bashrc file:
    PS1='[\e[0;36m\u\e[0m@\e[0;36m\h\e[0m]─[\e[0;33m\w\e[0m]\n└─\$ '
    For root (red color) /root/.bashrc:
    PS1='[\e[1;31m\u\e[0m@\e[1;31m\h\e[0m]─[\e[0;33m\w\e[0m]\n└─\$ '
    Now, if i login in console as a normal user it doesn't display blue color but red as if i was root user. Like i said in xterm or KDE Konsole it looks just fine. The case is that consoles don't use my .bashrc file and use instead /etc/bash.bashrc file: Here is my /etc/bash.bashrc file:
    # /etc/bash.bashrc
    # If not running interactively, don't do anything
    [[ $- != *i* ]] && return
    #PS1='[\u@\h \W]\$ '
    PS1='[\e[1;31m\u\e[0m@\e[1;31m\h\e[0m]─[\e[0;33m\w\e[0m]\n└─\$ '
    PS2='> '
    PS3='> '
    PS4='+ '
    case ${TERM} in
    xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    esac
    [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
    export EDITOR=/usr/bin/nano
    Here is my today's update:
    [2012-07-06 08:54] upgraded linux-api-headers (3.3.8-1 -> 3.4.4-1)
    [2012-07-06 08:54] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
    [2012-07-06 08:54] Generating locales...
    [2012-07-06 08:54] en_GB.UTF-8... done
    [2012-07-06 08:54] en_GB.ISO-8859-1... done
    [2012-07-06 08:54] Generation complete.
    [2012-07-06 08:54] upgraded glibc (2.15-12 -> 2.16.0-1)
    [2012-07-06 08:54] upgraded binutils (2.22-7 -> 2.22-8)
    [2012-07-06 08:54] upgraded dbus-core (1.6.0-5 -> 1.6.2-2)
    [2012-07-06 08:54] upgraded dbus (1.6.0-1 -> 1.6.2-1)
    [2012-07-06 08:54] upgraded device-mapper (2.02.96-2 -> 2.02.96-3)
    [2012-07-06 08:54] upgraded gcc-libs (4.7.1-3 -> 4.7.1-4)
    [2012-07-06 08:54] upgraded gcc (4.7.1-3 -> 4.7.1-4)
    [2012-07-06 08:54] upgraded grep (2.12-1 -> 2.13-1)
    [2012-07-06 08:54] upgraded initscripts (2012.06.3-1 -> 2012.06.3-2)
    [2012-07-06 08:54] upgraded libpurple (2.10.4-2 -> 2.10.5-1)
    [2012-07-06 08:54] upgraded libusb-compat (0.1.4-1 -> 0.1.4-2)
    [2012-07-06 08:54] upgraded lvm2 (2.02.96-2 -> 2.02.96-3)
    [2012-07-06 08:54] upgraded mpfr (3.1.0.p10-1 -> 3.1.1-1)
    Is it a problem in yesterday's pam upgrade? Yesterday i have moved /etc/pam.d/login.pacnew to /etc/pam.d/login. I didn't backup the old file. My bad. Weird thing is also this that today my KDE session crashed (for the first time) when i have used dd to burn image on my USB.
    Last edited by Shark (2012-07-06 08:40:31)

    Procyon wrote:What you want is [ -n "$SSH_CONNECTION" ] (variable is set/nonzero length) or the opposite [ -z "$SSH_CONNECTION" ] (variable is not set/zero length)
    Thanks-- that got it.  I was missing the quotes, so it was expanding at the spaces rather than interpreting the entire thing as a string.

  • Color shell/script output in bash/zsh

    So, I wanted to have an easy way to color my script output. In zsh there is a color module, but as far as I know it does only bold for special effects. Also there are some scripts around that let you call a predefined array, but there aren't any where you can combine options easily, like both bold and italic. ansi-color comes close, but it has almost 250 lines of code and I thought it could be done more efficiently. So here's color, both in a zsh and a bash variant (the shebang and the way of defining an array being the only difference).
    Save as "color" in your path, or wrap it in a function to store in either .bashrc or .zshrc. color --help for instructions. Let me know what you think, if it has bugs or if the coding can be more efficient or better (I did this mostly as a programming exercise, it's not *that* useful.
    ZSH color
    #!/bin/zsh
    color-usage() {
    cat <<"USAGE"
    Usage: color [OPTIONS] <color>
    -b|--bold for bold text
    -i|--italic for italic text
    -u|--underline for underlined text
    -f|--flash for blinking text, not possible together with --bg
    -r|--reverse to switch fg and bg colors
    -/--bg <color> for background color
    -d|--dark for fainted / less intense colors (your terminal may not support this)
    -x|--invisible for invisible text (your terminal may not support this)
    -ff|--fastflash for fast blinking text (your terminal may not support this), not possible together with --bg
    Color can be: black, red, green, yellow, blue, magenta, cyan, white and lightblack, lightred etc.
    Use "color" without specifying the color to reset to default.
    Notes:
    1. You can not use blink in combination with --bg, but you can do -r instead and define <color> as desired bg-color. Example: color -f -r blue lets black text blink on blue background. This means you have the bg color as text color, which can't be changed."
    2. Append $(color) behind the string you have formatted, or the color sequence may stay in effect, especially in bash.
    3. You can combine options like -b -i -f, but be sensible; -x -f is not sensible; neither is -d lightred.
    Examples:
    echo "This is $(color -f -i lightred)blinking italic lightred text$(color)"
    echo "This is $(color -bg blue white)white text on blue bg$(color)"
    echo "This shows words in $(color green)green $(color magenta)magenta $(color)and the rest normal"
    echo "This shows $(color -f -r cyan)bold blinking text on cyan background$(color)"
    USAGE
    # Define and create array "colors"
    typeset -Ag colors
    colors=( black "0" red "1" green "2" yellow "3" blue "4" magenta "5" cyan "6" white "7" )
    # Loop to read options and arguments
    while [ $1 ]; do
    case "$1" in
    '-h'|'--help') color-usage;;
    '-b'|'--bold') mode="${mode}1;";;
    '-d'|'--dark') mode="${mode}2;";;
    '-i'|'--italic') mode="${mode}3;";;
    '-u'|'--underline') mode="${mode}4;";;
    '-f'|'--flash') mode="${mode}5;";;
    '-ff'|'--fastflash') mode="${mode}6;";;
    '-r'|'--reverse') mode="${mode}7;";;
    '-x'|'--invisible') mode="8;";;
    '-bg'|'--bg') case "$2" in
    light*) bgc=";10${colors[${2#light}]}"; shift;;
    black|red|green|yellow|blue|magenta|cyan|white) bgc=";4${colors[$2]}"; shift;;
    esac;;
    'reset') reset=true;;
    *) case "$1" in
    light*) fgc=";9${colors[${1#light}]}";;
    black|red|green|yellow|blue|magenta|cyan|white) fgc=";3${colors[$1]}";;
    *) echo The color loop is buggy or you used it wrong;;
    esac;;
    esac
    shift
    done
    # Set color sequence
    mode="${mode%;}" # strip ";" from mode string if it ends with that
    echo -e "\e[${mode:-0}${fgc}${bgc}m" # (default value for mode = 0, so if nothing was set, go default; -e to please bash)
    unset mode intensity bgc fgc # clean up
    BASH color
    #!/bin/bash
    color-usage() {
    cat <<"USAGE"
    Usage: color [OPTIONS] <color>
    -b|--bold for bold text
    -i|--italic for italic text
    -u|--underline for underlined text
    -f|--flash for blinking text, not possible together with --bg
    -r|--reverse to switch fg and bg colors
    -/--bg <color> for background color
    -d|--dark for fainted / less intense colors (your terminal may not support this)
    -x|--invisible for invisible text (your terminal may not support this)
    -ff|--fastflash for fast blinking text (your terminal may not support this), not possible together with --bg
    Color can be: black, red, green, yellow, blue, magenta, cyan, white and lightblack, lightred etc.
    Use "color" without specifying the color to reset to default.
    Notes:
    1. You can not use blink in combination with --bg, but you can do -r instead and define <color> as desired bg-color. Example: color -f -r blue lets black text blink on blue background. This means you have the bg color as text color, which can't be changed."
    2. Append $(color) behind the string you have formatted, or the color sequence may stay in effect, especially in bash.
    3. You can combine options like -b -i -f, but be sensible; -x -f is not sensible; neither is -d lightred.
    Examples:
    echo "This is $(color -f -i lightred)blinking italic lightred text$(color)"
    echo "This is $(color -bg blue white)white text on blue bg$(color)"
    echo "This shows words in $(color green)green $(color magenta)magenta $(color)and the rest normal"
    echo "This shows $(color -f -r cyan)bold blinking text on cyan background$(color)"
    USAGE
    # Define and create array "colors"
    declare -A colors
    colors=( [black]="0" [red]="1" [green]="2" [yellow]="3" [blue]="4" [magenta]="5" [cyan]="6" [white]="7" )
    # Loop to read options and arguments
    while [ $1 ]; do
    case "$1" in
    '-h'|'--help') color-usage;;
    '-b'|'--bold') mode="${mode}1;";;
    '-d'|'--dark') mode="${mode}2;";;
    '-i'|'--italic') mode="${mode}3;";;
    '-u'|'--underline') mode="${mode}4;";;
    '-f'|'--flash') mode="${mode}5;";;
    '-ff'|'--fastflash') mode="${mode}6;";;
    '-r'|'--reverse') mode="${mode}7;";;
    '-x'|'--invisible') mode="8;";;
    '-bg'|'--bg') case "$2" in
    light*) bgc=";10${colors[${2#light}]}"; shift;;
    black|red|green|yellow|blue|magenta|cyan|white) bgc=";4${colors[$2]}"; shift;;
    esac;;
    'reset') reset=true;;
    *) case "$1" in
    light*) fgc=";9${colors[${1#light}]}";;
    black|red|green|yellow|blue|magenta|cyan|white) fgc=";3${colors[$1]}";;
    *) echo The color loop is buggy or you used it wrong;;
    esac;;
    esac
    shift
    done
    # Set color sequence
    mode="${mode%;}" # strip ";" from mode string if it ends with that
    echo -e "\e[${mode:-0}${fgc}${bgc}m" # (default value for mode = 0, so if nothing was set, go default; -e to please bash)
    unset mode intensity bgc fgc # clean up

    Soemthing like this will work

  • [Solved] ncmpcpp & Bash Colors?

    I'm posting this in the newbie corner, because I suspect that it's a really noob question.  Plus, this is my first post:
    I'm messing around with ncmpcpp, trying to get it looking nice.  I found the "post your ncmpcpp config" thread, and found a couple of configurations that I really liked... mostly because of the color schemes.  So, I tryied copying the configs linked, and the colors end up really different on my screen.
    At first I thought it was something to do with the config file, but I don't think so anymore... I've tried looking for bash color schemes, but haven't found anything that really seemed to do what I wanted.
    Example:
    See the config found in this post: linky
    Look at the linked screenshot, and compare it to what I see on my machine:
    My machine
    What I've got: rxvt-Unicode-256color, ncmpcpp.
    So, what's the stupid little detail that I'm missing?
    Last edited by d3snoopy (2010-08-29 01:18:26)

    There is a page on the Wiki detailing how you can contribute: http://wiki.archlinux.org/index.php/Getting_Involved
    You can also donate, if you would like to make a monetary contribution.
    Essentially, there are any number of avenues for you to support Arch; it depends on your skills and your enthusiasm. Read the Wiki, become as familiar as you can with the Arch Way and then lend a hand where you feel best able to help out - all and any contributions are welcomed if they are consistent with the Arch philosophy.

  • Zsh (and Bash) Backgrounds Refuse to Change Color [SOLVED]

    I'm sorry if this sounds like a stupid question, but here goes.
    I installed Arch about a week ago and decided that I wanted to change the color of the terminal. I followed the guide on the Arch Wiki, (https://wiki.archlinux.org/index.php/Color_Bash_Prompt), creating all of the necessary files and copy-and-pasting all of the given text into those files. When I restarted my terminal, nothing happened. Fed up, I tried installing Zsh + oh-my-zsh. I successfully installed the two and installed  a zsh theme, but the background color still does not change. The text color, however, changes to the appopriate colors, but the background color remains white.
    Can anyone please tell me what I'm doing wrong?
    Edit: I didn't specify, but I really don't care which terminal I end up using, just as long as the colors work.
    Last edited by Thermite (2012-12-19 01:23:20)

    zsh and bash are shells, not terminal emulators. There is no "default" terminal, if you're using Arch. You had to install a terminal emulator at some point. Or maybe if you followed the beginner's guide you're using xterm. What window manager are you using?
    There are ways to set the background color in rxvt and in xterm using your .Xresources file. Look at the wiki topic for each of those terminals for more information.
    Maybe an easier method for you would be to install a terminal emulator that has menu support, like Terminator, LXTerminal, or Sakura. Then you can just right-click in the terminal and use the menu to set the background color and opacity.
    Last edited by 2ManyDogs (2012-12-18 23:03:53)

  • [Solved] How do I get bash to be colorful like in Gentoo?

    I know that this isn't Gentoo, so yall don't need to remind me just in case you were thinking about doing that, but I also know that this IS LINUX (sorry that was a 300 reference, you know, "this is Sparta," et cetera, et cetera (Yeah, I know it was unnecessary, but I couldn't help it, the temptation was too tantalizing)) and therefore what bash can do on one Linux Box should be able to happen on, more or less, any Linux Box.
    Last edited by Boxes (2011-12-15 04:27:38)

    anonymous_user wrote:
    To the OP you may be interested in Gentoo's bashrc:
    http://www.jeremysands.com/archlinux/ge … hrc-2008.0
    Thank you, I tried searching for different kinds of terminals, but I wasn't familiar with any of the one's listed (or at least I wasn't familiar with them by name, though I might have recognized them if I had used them, though I'm not sure) except for the one that I remember having used in ArchBang, which I liked very much because it's terminal showed so much info regarding my system.
    Last edited by Boxes (2011-12-15 04:29:58)

  • Custom bash coloring bug?

    Hi,
    I notice that when I change my console color through the .bashrc file, the LS command results in the color replacement for 'white' not working past the 'blue' items. For example, in the listing for "ls", any blue items that occur will result in the "gray" text instead of the new color meant to replace it. Is there a fix for this?

    Hi,
    I put the 'dircolors' command in my .bashrc, but now when I login I get the following output in my shell:
    LS_COLORS='rs=0:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:';
    export LS_COLORS
    This happens immediately after I login and type my password in SSH. Why is it doing this, and how can I prevent this output? Thanks.

  • Color Bash prompt Wiki needs editing [SOLVED]

    Howdy archers
    I didn't know where else or who I should contact for this....
    but I found something that "may" need editing on this part of the wiki     http://wiki.archlinux.org/index.php/Color_Bash_Prompt
    the part where it says     * Edit root's Bash file; copy it from /etc/skel if the file is not present:
    # nano /root/.bash_profile
    I tried this over and over again with no luck... then I figured out that the info on the wiki was incorrect... you are not suppose
    copy ".bash_profile" to /root     you are suppose to copy    ".bashrc" over to /root and add what you want in it... otherwise
    no changes take effect
    cheers
    Last edited by kaddy (2010-05-26 09:24:36)

    oh yeah... I forgot anybody can edit the arch wiki... will do

Maybe you are looking for

  • TS1474 Syncing multiple iphones from one itunes account

    My wife and I each have our own iphones. We use just one itunes account on our main computer at home. We each have our own apple ID's. My question is this: Whenever we try to sync our phones to itunes, this screen appears I have NO IDEA whaich of the

  • Using iPod as external hard drive?

    So when I bought my ipod classic a month ago, the guy in the store told me I could use it as an external hard drive and store files on it for whatever reason. My friend connected the ipod to his computer, which is a pc, and stored a LOT of .jpeg file

  • Why do Apple not support bluetooth?

    Why do Apple not support basic bluetooth profiles? Why can I not use BT file sharing with my PC? Why can I not use generic HID on PC? All other smartphones on the market support this. Do Apple not want PC customers?

  • SQL Server Status SHUTDOWN | Normal

    Hi I have one sql 2008 database .TDP backup is running for this server.now I am not able to take log backup on this server.It is failing.When I checked the database properties I found that status - Shutdown | Normal. I am able to access this database

  • Install Asian Language support files, how?

    I just purchased Acrobat XI Pro, and am running it under Windows 7 Ultimate. How do I install the Asian Language support files for Acrobat? After my initial installation, if I execute setup.exe to modify Acrobat XI, only English is listed under Langu