Sponsored Content
Full Discussion: Error in Comparison value
Top Forums Shell Programming and Scripting Error in Comparison value Post 302769343 by clx on Tuesday 12th of February 2013 03:13:21 AM
Old 02-12-2013
So now you can see the $count is not equals to just "1". there are column headers and other stuffs along with the value.

you must do "set heading off" inside sqlplus.
You might also require to suppress the white spaces before and after the value either db level or shell level.
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

comparison

can anyone point me to a comparison of *nix file systems ? i think i prefer a journalling fs but i would like to see a comparison between several fs's before i make up my mind (2 Replies)
Discussion started by: cnf
2 Replies

2. UNIX for Dummies Questions & Answers

Unix comparison

I am very new to Unix. What are the similiarities and differences between ScoUnix and AIX5 if any? Where might i find the information? Which is better? (1 Reply)
Discussion started by: NewGuy100
1 Replies

3. Shell Programming and Scripting

Comparison error

My default shell is ksh. I'm making a simple comparison in a script. ... if then ... i keep getting the error " ] if if if I have also tried all of these with parentheses instead of brackets, nothing works. I know exists1 (I expect it to be 1 in my tests) is being set properly,... (2 Replies)
Discussion started by: lazerfoursix
2 Replies

4. Shell Programming and Scripting

need some help..Comparison

I need some help which would probably be for most of you a simple script. I need to read in the data from a .dat file and then compare avg to see who is the highest avg. Here is my script so far. #!/bin/ksh #reading in the data from lab3.dat filename=$1 while read name o1 o2 o3 o4 o5 o6... (0 Replies)
Discussion started by: bluesilo
0 Replies

5. Solaris

Error in String comparison

Hi, I am getting an error while executing the below code. The error is " then echo "string matches" fi Please help me to solve this error (3 Replies)
Discussion started by: sreedivia
3 Replies

6. Shell Programming and Scripting

$((...)) and $[...] comparison

Does $((mathematical expression)) and $ mean the same? (7 Replies)
Discussion started by: proactiveaditya
7 Replies

7. Shell Programming and Scripting

row Comparison

(5 Replies)
Discussion started by: number10
5 Replies

8. Shell Programming and Scripting

Error in if condition string comparison

Hello all! I need help in debugging following script. I have no idea where I am going wrong. #!/bin/bash for p1 in A1 TM MP do for p2 in A1 TM MP do for mp1 in N1 N2 do for mp2 in N1 N2 do for mp3 in N1 N2 do for mp4 in N1 N2 do for... (7 Replies)
Discussion started by: RLOA
7 Replies

9. UNIX for Dummies Questions & Answers

comparison

hi guys i need a program that can compare a value read from a com-port and one from the terminal. can somebody help me??? using linux kernel 2.6.14-M5 can only use standard function in sh and bash... (5 Replies)
Discussion started by: metal005
5 Replies

10. Shell Programming and Scripting

Help about comparison

Hello folks, I have two files, which have usernames, I want to see the contents of file1.txt which is missing in file2.txt and another comparison file2.txt contents which is missing in file1.txt. please suggest. file1.txt user u2 u8 a9 p9 p3 u4 z8 aaa ahe oktlo (7 Replies)
Discussion started by: learnbash
7 Replies
log(n)								 Logging facility							    log(n)

NAME
log - Procedures to log messages of libraries and applications. SYNOPSIS
package require Tcl 8 package require log ?1.0.1? ::log::levels ::log::lv2longform level ::log::lv2color level ::log::lv2priority level ::log::lv2cmd level ::log::lv2channel level ::log::lvCompare level1 level2 ::log::lvSuppress level {suppress 1} ::log::lvSuppressLE level {suppress 1} ::log::lvIsSuppressed level ::log::lvCmd level cmd ::log::lvCmdForall cmd ::log::lvChannel level chan ::log::lvChannelForall chan ::log::lvColor level color ::log::lvColorForall color ::log::log level text ::log::logMsg text ::log::logError text ::log::Puts level text DESCRIPTION
The log package provides commands that allow libraries and applications to selectively log information about their internal operation and state. To use the package just execute package require log log::log notice "Some message" As can be seen above, each message given to the log facility is associated with a level determining the importance of the message. The user can then select which levels to log, what commands to use for the logging of each level and the channel to write the message to. In the following example the logging of all message with level debug is deactivated. package require log log::lvSupress debug log::log debug "Unseen message" ; # No output By default all messages associated with an error-level (emergency, alert, critical, and error) are written to stderr. Messages with any other level are written to stdout. In the following example the log module is reconfigured to write debug messages to stderr too. package require log log::lvChannel debug stderr log::log debug "Written to stderr" Each message level is also associated with a command to use when logging a message with that level. The behaviour above for example relies on the fact that all message levels use by default the standard command ::log::Puts to log any message. In the following example all mes- sages of level notice are given to the non-standard command toText for logging. This disables the channel setting for such messages, assum- ing that toText does not use it by itself. package require log log::lvCmd notice toText log::log notice "Handled by Another database maintained by this facility is a map from message levels to colors. The information in this database has no influence on the behaviour of the module. It is merely provided as a convenience and in anticipation of the usage of this facility in tk-based applica- tion which may want to colorize message logs. API
The following commands are available: ::log::levels Returns the names of all known levels, in alphabetical order. ::log::lv2longform level Converts any unique abbreviation of a level name to the full level name. ::log::lv2color level Converts any level name including unique abbreviations to the corresponding color. ::log::lv2priority level Converts any level name including unique abbreviations to the corresponding priority. ::log::lv2cmd level Converts any level name including unique abbreviations to the command prefix used to write messages with that level. ::log::lv2channel level Converts any level name including unique abbreviations to the channel used by ::log::Puts to write messages with that level. ::log::lvCompare level1 level2 Compares two levels (including unique abbreviations) with respect to their priority. This command can be used by the -command option of lsort. The result is one of -1, 0 or 1 or an error. A result of -1 signals that level1 is of less priority than level2. 0 signals that both levels have the same priority. 1 signals that level1 has higher priority than level2. ::log::lvSuppress level {suppress 1}] (Un)suppresses the output of messages having the specified level. Unique abbreviations for the level are allowed here too. ::log::lvSuppressLE level {suppress 1}] (Un)suppresses the output of messages having the specified level or one of lesser priority. Unique abbreviations for the level are allowed here too. ::log::lvIsSuppressed level Asks the package whether the specified level is currently suppressed. Unique abbreviations of level names are allowed. ::log::lvCmd level cmd Defines for the specified level with which command to write the messages having this level. Unique abbreviations of level names are allowed. The command is actually a command prefix and this facility will append 2 arguments before calling it, the level of the mes- sage and the message itself, in this order. ::log::lvCmdForall cmd Defines for all known levels with which command to write the messages having this level. The command is actually a command prefix and this facility will append 2 arguments before calling it, the level of the message and the message itself, in this order. ::log::lvChannel level chan Defines for the specified level into which channel ::log::Puts (the standard command) shall write the messages having this level. Unique abbreviations of level names are allowed. The command is actually a command prefix and this facility will append 2 arguments before calling it, the level of the message and the message itself, in this order. ::log::lvChannelForall chan Defines for all known levels with which which channel ::log::Puts (the standard command) shall write the messages having this level. The command is actually a command prefix and this facility will append 2 arguments before calling it, the level of the message and the message itself, in this order. ::log::lvColor level color Defines for the specified level the color to return for it in a call to ::log::lv2color. Unique abbreviations of level names are allowed. ::log::lvColorForall color Defines for all known levels the color to return for it in a call to ::log::lv2color. Unique abbreviations of level names are allowed. ::log::log level text Log a message according to the specifications for commands, channels and suppression. In other words: The command will do nothing if the specified level is suppressed. If it is not suppressed the actual logging is delegated to the specified command. If there is no command specified for the level the message won't be logged. The standard command ::log::Puts will write the message to the channel specified for the given level. If no channel is specified for the level the message won't be logged. Unique abbreviations of level names are allowed. Errors in the actual logging command are not caught, but propagated to the caller, as they may indicate miscon- figurations of the log facility or errors in the callers code itself. ::log::logMsg text Convenience wrapper around ::log::log. Equivalent to ::log::log info text. ::log::logError text Convenience wrapper around ::log::log. Equivalent to ::log::log error text. ::log::Puts level text The standard log command, it writes messages and their levels to user-specified channels. Assumes that the suppression checks were done by the caller. Expects full level names, abbreviations are not allowed. LEVELS
The package currently defines the following log levels, the level of highest importance listed first. o emergency o alert o critical o error o warning o notice o info o debug KEYWORDS
log, log level, message level, message log 1.0.1 log(n)
All times are GMT -4. The time now is 06:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy