10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have
export LOG_FILE=$HOME_DIR/error.log
sqlplus -s /nolog << EOF
whenever sqlerror exit sql.sqlcode
@$HOME_DIR/connect.sql
whenever sqlerror exit sql.sqlcode
@$SQL_FILE
EOF
can display the sql error in putty, how can I write them into log file ?:( (2 Replies)
Discussion started by: Hscript
2 Replies
2. Shell Programming and Scripting
Hi, im trying to write a grep script that returns me the last inputs added in the last hour in the log file. Literally i have nothing yet but:
grep 'Line im looking for' LOGFILE.log | tail -1
this only gives me the last input, but no necessarily from the last hour.
Help Please. (4 Replies)
Discussion started by: blacksteel1988
4 Replies
3. Shell Programming and Scripting
Hello please help me on this,
pick the last one hour lines from the log, which have the prefix time format like this.
log message
log message
i tried to do grep, but that failed.
my code
grep '(date +)' log_file_path
This checking only the current time stamp. How to get the log... (16 Replies)
Discussion started by: santosh2626
16 Replies
4. Shell Programming and Scripting
I want to extract a pattern from a log file within last hour.
I am doing
grep "pattern" filename | tail -1
It gives the last latest pattern but not within last hour.
and if the pattern found in last hour, output success or else failure. (3 Replies)
Discussion started by: santosh2626
3 Replies
5. Shell Programming and Scripting
Hi friends, I want to convert 24 hour timing to 12 hour please help me...
my data file looks like this..
13-Nov-2011 13:27:36 15.32044 72.68502
13-Nov-2011 12:08:31 15.31291 72.69807
16-Nov-2011 01:16:54 15.30844 72.74028
15-Nov-2011 20:09:25 15.35096 ... (13 Replies)
Discussion started by: nex_asp
13 Replies
6. Shell Programming and Scripting
Hi,
Just wondering, is there anyway I can get the total of logs generated by hours ? Let say I have these logs,
Sep 23 04:48:43 hsbcufs: NOTICE: realloccg /: file system full
Sep 23 04:48:47 hsbcufs: NOTICE: alloc: /: file system full
Sep 23 04:48:51 hsbcufs: NOTICE: realloccg /: file... (14 Replies)
Discussion started by: dehetoxic
14 Replies
7. Shell Programming and Scripting
I have a log like this:
Jan 26 13:59:41 server2 ntpdate: step time server 91.189.94.4 offset 0.065456 sec
Jan 26 13:59:41 server2 ntpd: ntpd 4.2.4p8@1.1612-o Fri Aug 6 22:49:54 UTC 2010 (1)
Jan 26 13:59:41 server2 ntpd: precision = 1.000 usec
Jan 26 13:59:41 server2 ntpd: ntp_io: estimated max... (2 Replies)
Discussion started by: Jotne
2 Replies
8. IP Networking
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies
9. Programming
I have a C program and want to write messages to a log. BSM is being used for O/S auditing. Can I write my messages to the BSM log? If so, how do I do that? I'm not finding any API's for that. Any URLs, samples, guidance would be appreciated. (0 Replies)
Discussion started by: JDO
0 Replies
10. UNIX for Dummies Questions & Answers
My program:
__________________________________
#!/bin/ksh
DAY=`date +%y%m%d`
H=`date +%H`
M=`date +%M`
day=`date +%m/%d/%y`
let h=$H-1
echo DAY $DAY
echo H $H
echo M $M
echo day $day
echo h $h
_____________________________________
My result: (3 Replies)
Discussion started by: bobo
3 Replies