Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Display Console errors in Red color Post 302541779 by ramse8pc on Monday 25th of July 2011 04:42:26 PM
Old 07-25-2011
Display Console errors in Red color

I browsed the forums but i couldn't find the best answer.so,i'm posting here again..
I have a parent bash script which calls another child script and the child script is used to deploy the tar file using weblogic deployer.
The script is used to display the output on the console and sent to a log file as well.
My problem is how can i display any error message in the output in a red color on the console?
It would be great if the errors in the log are also shown in red color.The errors could be from the weblogic deployer or from the scripts.

we use this for deploying the war.
HTML Code:
${JAVA_PATH}/java -classpath ${WEBLOGIC_HOME}/server/lib/weblogic.jar weblogic.Deployer 
-adminurl ${WEBLOGIC_ABC_ADMIN_URL} -user ${WEBLOGIC_USERNAME} -password
 $WEBLOGIC_PASSWORD -deploy -targets ${CLUSTER} -name ${RESOURCE_WEB_CONTEXT}
 -upload $WORK_DIR/artifacts/webapp/components/${CONTEXT}-1.0.0-c.war
Appreciate your help in advance.

Thanks
-Ramesh

Last edited by ramse8pc; 07-25-2011 at 05:50 PM.. Reason: wrapped long lines
 

6 More Discussions You Might Find Interesting

1. Solaris

Red stop signs in Solaris Management Console 2.1

I've installed Solaris 10 (x86 8/07) on a Dell PowerEdge 2950. When I bring up the Solaris Management Console I get red stop sign looking icons on all areas (System Status, System Configuration, Services, Storage, and Devices and hardware) under This computer. Originally nothing was showing up... (1 Reply)
Discussion started by: kayroreality
1 Replies

2. Shell Programming and Scripting

How to have color coded Terminal display,(like linux)

Hi all, I would like to know how to have a color display in the terminal... In the sense that, In many linux terminals,we have color coded for each file type, green for executable ,blue for dirs and so on... I wanted to know how i can have the same arrangement in solaris(b-79a) I am not... (5 Replies)
Discussion started by: wrapster
5 Replies

3. Shell Programming and Scripting

tcsh/csh: set prompt in production to color red

Hi folks This is our prompt at the moment oracle@pinkipinki:/opt/oracle> grep 'set prompt' .cshrc set prompt = "$user@`uname -n`:$cwd> " We wish to have in production the same prompt, but red. Howto do that? I tried a lot a internet manuals, but it doesn't work. (1 Reply)
Discussion started by: slashdotweenie
1 Replies

4. Shell Programming and Scripting

regarding Color scheme in linux console connected through putty.

Hi All, I am connecting to SunOs 5.8 server from windows machine through putty. My problem is commands are not showing any colours results. I want to see 'ls' command should list directories in 'red' and files in 'green' etc. How to do it . Please help. Also How to enable syntax colouring in... (6 Replies)
Discussion started by: Sooraj_Linux
6 Replies

5. Solaris

X11 errors on Solaris 10 - SL Console not showing up

Hi all, I have been administrating large backup environments for quite some time now, but I have never seen the types of errors I'm getting for a client I have in Asia, so I humbly appeal to your expertise in order to fix things. Set up: StreamLine 8500 library connected to a Solaris... (7 Replies)
Discussion started by: dilibau
7 Replies

6. UNIX for Dummies Questions & Answers

Display file with escaped color codes

Hi, I have a file containing color codes: Fri May 25 17:13:04 2012: Starting MTA: exim4^ Loading cpufreq kernel modules...^How can I display it colorized on a linux terminal? (4 Replies)
Discussion started by: ripat
4 Replies
BF_TAR(1)						    Bogofilter Reference Manual 						 BF_TAR(1)

NAME
bf_tar - shell script to write a tar file of a bogofilter directory to stdout SYNOPSIS
bf_tar [-r] [-R] bogofilter_directory DESCRIPTION
bf_tar bundles a bogofilter working directory in tar format and copies it to standard output (your console, or where you redirect it, see EXAMPLES below). OPTIONS
The -r option causes bf_tar to remove inactive log files after the archive has been written successfully. The default is to leave log files. The -R option causes bf_tar to remove inactive log files before the archive is written. This may reduce chances that the resulting archive is recoverable should it become damaged. The archive may be smaller though. The default is to leave log files. EXIT STATUS
The script exits with status code 0 if everything went well, and nonzero if it encountered trouble. EXAMPLES
o bf_tar ~/.bogofilter > outfile.tar Writes a standard .tar file containing the essential files from ~/.bogofilter to outfile.tar. o bf_tar ~/.bogofilter | gzip -9 -c > outfile.tar.gz Writes a gzipped .tar.gz file containing the essential files from ~/.bogofilter to outfile.tar.gz. o bf_tar `pwd`/mydirectory > outfile.tar Prepend $(pwd)/ or `pwd`/ if you want to specify an absolute path instead of a relative path. NOTES
This script is meant for use with Berkeley DB based bogofilter versions. This script requires a SUSv2 compliant pax utility. This script expects a SUSv2 compliant shell. Solaris systems should have the SUNWxcu4 package installed (when bogofilter is configured) so that /usr/xpg4/bin/sh can be used. AUTHORS
Matthias Andree Bogofilter 03/15/2010 BF_TAR(1)
All times are GMT -4. The time now is 07:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy