Hi... me again... i find out soumething today... when you say
you are including "unsuccessfully" like a green... and it shouldnt... help please...
Please show a sample from your logfile so I can tell how to match it more specifically. If successfully appears at the beginning of a line, you could grep "^successfully" for instance.
Quote:
is there something like a "distinct" command?
If I get your meaning, i.e. 'distinct' like in SQL, people often use sort -u for that, but I suspect there are dates and the like which make the entries differ from each other even when you'd like them to be combined. Things like cut and/or awk can trim it down to the parts you want, after which you can sort -u to remove the duplicates. Depending on the problem, sometimes people do it all in one awk, noting down the things to keep in an associative array until the program ends, when they're all printed without duplicates. The output from this tends to be in unpredictable and arbitrary order however.
i really don want to remove duplicates, cause there aint no duplicates... my problem now is that whenever the export terminate successfully or unsuccesfully it recognizes it like a successfull command and it displays the messages in green. I tried
and it seems to work...
but i want to know your comments about this. And thanks for taking your time.
Greetings!!
---------- Post updated at 10:06 AM ---------- Previous update was at 10:04 AM ----------
the output for the 'distinct' would be a warning llike ' please contact your systema administrator or dba'
i really don want to remove duplicates, cause there aint no duplicates... my problem now is that whenever the export terminate successfully or unsuccesfully it recognizes it like a successfull command and it displays the messages in green. I tried
and it seems to work...
but i want to know your comments about this. And thanks for taking your time.
In general this seems like a good way to detect success here, since there's only one way for it to be successful -- anything other than 'terminated successfully' will be considered an error. As long as you know there isn't going to be more than one thing in the file, this should work.
If there could be a successful run followed by a failed one, it will find the successful run and print success falsely.
Quote:
the output for the 'distinct' would be a warning llike ' please contact your systema administrator or dba'
Yes, but why would it be printing that? If you don't mean 'distinct' in the SQL sense, what do you mean it in? What's distinct, about what?
You're going to have to show the input you have, the output you want, and the logic which explains why one causes the other if you want to be understood without playing a game of 20-questions.
Ok, i need that i.e. the export did not was execute successfully displays any other message of warning. Why? because it has to be reported to the dba's or system admins for a fast solution since the export could fail for more than one reason. If the export terminated successfully i need to print the message "export terminated successfully".. with that i have no problem... now, the thing is, when i mean "distinct", its an example, i mean different to successfull, because i found out today that the grep command finds the successfull and the unsuccessfull line equals.. thats why i need to print a different message when it goes unsuccesfull. But with the grep for 'Terminated successfully' i believe i have my alternative. Thats my way of see it. Then again this is part of my input and output:
I have been reading old posts and trying to come up with a solution for the below: Use a tab-delimited input file to assign
point to variables that are used to update a specific field, Rank. I really couldn't find too much in the way of assigning points
to variable, but made an attempt at an awk... (4 Replies)
Hi, was after some help for the following. I want to enforce local passwd authentication for service accounts and kerberos authentication for users.
Solaris 11 lets me assign different PAM modules to specific users via usermod and linux lets me define via UID, but I can't find a way to do this... (0 Replies)
hi friends,
The code:
i=1
while
do
filename=`/usr/bin/ls -l| awk '{ print $9}'`
echo $filename>>summary.csv
#Gives the name of the file stored at column 9
count=`wc -l $filename | awk '{print $1}'`
echo $count>>summary.csv
#Gives just the count of lines of file "filename"
i=`expr... (1 Reply)
Ok so all i'm trying to do here is output a file and change the color of a specific word. I can't use grep with color because I need all lines of the file not just lines that match the pattern.
I can get this substitution to work but when it displays it shows exactly what i'm putting it rather... (14 Replies)
Ok, I sort of need to create a command files that will be ftped to another server to run.
I have some input variable that will need to be read, and then transformed into another script file. Here are some examples.
Server 1:
outputCmd.sh
passing in ./outputCmd.sh nh8oaxt Release_4_0... (1 Reply)
Hi Everyone,
How to assign the specific value which return from database?
here is the return value from database -->
(return status = 0)
0 <----- this
I only need to get the "0" .. assign to another declare variable.
hope someone will help me..
Please
thank you.. (4 Replies)