Sponsored Content
Full Discussion: checking ERRors in files
Top Forums Shell Programming and Scripting checking ERRors in files Post 302155993 by ali560045 on Monday 7th of January 2008 01:22:40 AM
Old 01-07-2008
checking ERRors in files

I m having trouble in a script.I need To write a script that will check for Following Errors in Logs Files,i.e files having Extension .log

The erros are

2008-01-01 15:19:11,822 [main] ERROR - ORA-01115: IO error reading block from file 51 (block # 717090)
ORA-01110: data file 51: '/ednpdtu1/u01/oradata/EDNAMIP/indx_l_2_04.dbf'
ORA-27091: skgfqio: unable to queue I/O
ORA-27072: skgfdisp: I/O error

Can U Help me out in this................There are some 80 logs files and I need to check the above error in all those 80 log files
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

checking for script errors

ok, i have a script which i use to search my process' for specific keywords and kill any process containing them. there is a prompt to enter a keyword for searching and another prompt for which user you want to search the process' of. i want the script to have something that if you entered a search... (1 Reply)
Discussion started by: Blip
1 Replies

2. UNIX for Dummies Questions & Answers

checking for files on ftp...

I have automated my ftp session as given in on of the previous threads as: #! /usr/bin/ksh HOST=remote.host.name USER=whoever PASSWD=whatever exec 4>&1 ftp -nv >&4 2>&4 |& print -p open $HOST print -p user $USER $PASSWD print -p cd directory print -p binary print -p get xyz wait... (3 Replies)
Discussion started by: jithinravi
3 Replies

3. UNIX for Advanced & Expert Users

how to login into another ip and checking for the files

Hi All, Good Day. need one help regarding unix script. i have to check whether the particular file is there or not in another ip address. suppose....there is file in this ip address 2.160.64.130 in particualar location. i have to veify this from another ip adress(Say 2.160.64.131).if the file... (1 Reply)
Discussion started by: saikumar_n
1 Replies

4. UNIX for Dummies Questions & Answers

Checking files extension

Hi, I need one line command to display all files that ends with .scr. Example: In a directory I have 10 files, out of that 4 files have filetype extension .dat and 4 files with .scr and 2 files with .txt.... In this i want to display only files that ends with .scr. I tried some commands,... (2 Replies)
Discussion started by: gwgreen1
2 Replies

5. Ubuntu

Errors while extracting zip files

I tried to untar a file, test123.tar.gz by doing : tar -zxvf test123.tar.gz but got the following error msg: gzip: stdin: not in gzip format tar: Child returned status 1 tar: Exiting with failure status due to previous errors What do i do now? Pl Suggest Thanks (3 Replies)
Discussion started by: DCH
3 Replies

6. UNIX for Dummies Questions & Answers

Need help in checking for files in subfolders

Hi, I am trying to print a listing of files from the top level directory, check to see if any files have the same name as the top level directory name and if so, cd to that file and list the files under it. Don't know how to check for the file in the next level. What I have so far: ... (6 Replies)
Discussion started by: tes218
6 Replies

7. Shell Programming and Scripting

Checking in a directory how many files are present and basing on that merge all the files

Hi, My requirement is,there is a directory location like: :camp/current/ In this location there can be different flat files that are generated in a single day with same header and the data will be different, differentiated by timestamp, so i need to verify how many files are generated... (10 Replies)
Discussion started by: srikanth_sagi
10 Replies

8. Programming

Linker errors linking to .a files on OS X

Basically my problem is that when I try to compile anything using ./configure && make, it fails because of linker errors. I can reproduce the behavior I'm getting as follows: I have the two following files main.c: #include <stdio.h> extern void func(void); int main(int argc, char... (5 Replies)
Discussion started by: MarshallBanana
5 Replies

9. AIX

I see some errors in syslog files in AIX. can these be ignored ?

Hello, Could you please check the below errors. I found these errors in AIX LPAR syslogs. auth|security:err|error sshd error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key daemon:err|error syslog: slp: 0660-059 Impossible to get local interface for distant address 10.x.x.x. errno... (2 Replies)
Discussion started by: Kumar7997
2 Replies

10. Shell Programming and Scripting

Errors trying to use all files of a type

I am trying to create a code that will use all the bam files stored on a separate drive (/media/cmccabe/C2F8EFBFF8EFAFB9/pool_I_090215), run them in a program that I have changed the directory to, and the output gets re-directed to (/home/cmccabe/Desktop/NGS/pool_I_090215). I have tried the... (11 Replies)
Discussion started by: cmccabe
11 Replies
CMDTEST(1)						      General Commands Manual							CMDTEST(1)

NAME
cmdtest - blackbox testing of Unix command line tools SYNOPSIS
cmdtest [-c=COMMAND] [--command=COMMAND] [--config=FILE] [--dump-config] [--dump-memory-profile=METHOD] [--dump-setting-names] [--generate-manpage=TEMPLATE] [-h] [--help] [-k] [--keep] [--list-config-files] [--log=FILE] [--log-keep=N] [--log-level=LEVEL] [--log-max=SIZE] [--no-default-configs] [--output=FILE] [-t=TEST] [--test=TEST] [--timings] [--version] [FILE]... DESCRIPTION
cmdtest black box tests Unix command line tools. Given some test scripts, their inputs, and expected outputs, it verifies that the command line produces the expected output. If not, it reports problems, and shows the differences. Each test case foo consists of the following files: foo.script a script to run the test (this is required) foo.stdin the file fed to standard input foo.stdout the expected output to the standard output foo.stderr the expected output to the standard error foo.exit the expected exit code foo.setup a shell script to run before the test foo.teardown a shell script to run after test Usually, a single test is not enough. All tests are put into the same directory, and they may share some setup and teardown code: setup-once a shell script to run once, before any tests setup a shell script to run before each test teardown a shell script to run after each test teardown-once a shell script to run once, after all tests cmdtest is given the name of the directory with all the tests, or several such directories, and it does the following: o execute setup-once o for each test case (unique prefix foo): -- execute setup -- execute foo.setup -- execute the command, by running foo.script, and redirecting standard input to come from foo.stdin, and capturing standard output and error and exit codes -- execute foo.teardown -- execute teardown -- report result of test: does exit code match foo.exit, standard output match foo.stdout, and standard error match foo.stderr? o execute teardown-once Except for foo.script, all of these files are optional. If a setup or teardown script is missing, it is simply not executed. If one of the standard input, output, or error files is missing, it is treated as if it were empty. If the exit code file is missing, it is treated as if it specified an exit code of zero. The shell scripts may use the following environment variables: DATADIR a temporary directory where files may be created by the test TESTNAME name of the current test (will be empty for setup-once and teardown-once) SRCDIR directory from which cmdtest was launched OPTIONS
-c, --command=COMMAND ignored for backwards compatibility --config=FILE add FILE to config files --dump-config write out the entire current configuration --dump-memory-profile=METHOD make memory profiling dumps using METHOD, which is one of: none, simple, meliae, or heapy (default: simple) --dump-setting-names write out all names of settings and quit --generate-manpage=TEMPLATE fill in manual page TEMPLATE -h, --help show this help message and exit -k, --keep keep temporary data on failure --list-config-files list all possible config files --log=FILE write log entries to FILE (default is to not write log files at all); use "syslog" to log to system log --log-keep=N keep last N logs (10) --log-level=LEVEL log at LEVEL, one of debug, info, warning, error, critical, fatal (default: debug) --log-max=SIZE rotate logs larger than SIZE, zero for never (default: 0) --no-default-configs clear list of configuration files to read --output=FILE write output to FILE, instead of standard output -t, --test=TEST run only TEST (can be given many times) --timings report how long each test takes --version show program's version number and exit EXAMPLE
To test that the echo(1) command outputs the expected string, create a file called echo-tests/hello.script containing the following con- tent: #!/bin/sh echo hello, world Also create the file echo-tests/hello.stdout containing: hello, world Then you can run the tests: $ cmdtest echo-tests test 1/1 1/1 tests OK, 0 failures If you change the stdout file to be something else, cmdtest will report the differences: $ cmdtest echo-tests FAIL: hello: stdout diff: --- echo-tests/hello.stdout 2011-09-11 19:14:47 +0100 +++ echo-tests/hello.stdout-actual 2011-09-11 19:14:49 +0100 @@ -1 +1 @@ -something else +hello, world test 1/1 0/1 tests OK, 1 failures Furthermore, the echo-tests directory will contain the actual output files, and diffs from the expected files. If one of the actual output files is actually correct, you can actualy rename it to be the expected file. Actually, that's a very convenient way of creating the ex- pected output files: you run the test, fixing things, until you've manually checked the actual output is correct, then you rename the file. SEE ALSO
cliapp(5). CMDTEST(1)
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy