Sponsored Content
Top Forums Shell Programming and Scripting Searching a specific line in a large file Post 302212394 by jambesh on Monday 7th of July 2008 11:31:45 AM
Old 07-07-2008
Here is some idea to do this --
--------------------------------
ls -1 | while read record;do
rv=`echo $record | grep -w "ERROR-STRING"`
if [ $? -eq 0 ]
then
mailx -s "Error found in record - $record " xxxx@yourcompany.com
fi
done
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Searching for data on a specific line numbers

Hi, I have a file on windows and have some unix utilitties available on windows. This file is very large and have over 5 million record. I am not able to open this file in Window Editor. I am trying to see bad data on a specific lines. I just have line numbers that has bad data. I need to see the... (8 Replies)
Discussion started by: rkumar28
8 Replies

2. UNIX for Dummies Questions & Answers

viewing and searching large file

I need to search a very large file. 13g in size. i am looking for a record that has a value in the byte 4200 . how can i view the file or how can i search for value in the byte 4200? (1 Reply)
Discussion started by: Wrightman
1 Replies

3. UNIX for Dummies Questions & Answers

Help with selecting specific lines in a large file

Hello, I need to select the 3 lines above as well as below a search string, including the search string. I have been trying various combinations using sed command without any success. Can anuone help please. Thanking (2 Replies)
Discussion started by: tansha
2 Replies

4. Shell Programming and Scripting

Count specific character(s) very large file

I'm trying to count the number of 2 specific characters in a very large file. I'd like to avoid using gsub because its taking too long. I was thinking something like: awk '-F' { t += NF - 1 } END {print t}' infile > outfile which isn't working Any ideas would be great. (3 Replies)
Discussion started by: dcfargo
3 Replies

5. Shell Programming and Scripting

remove a specific line in a LARGE file

Hi guys, i have a really big file, and i want to remove a specific line. sed -i '5d' fileThis doesn't really work, it takes a lot of time... The whole script is supposed to remove every word containing less than 5 characters and currently looks like this: #!/bin/bash line="1"... (2 Replies)
Discussion started by: blubbiblubbkekz
2 Replies

6. Shell Programming and Scripting

Searching for a specific string in a file

Hi I am trying to search for a certain set of patterns within a file, and then perform other commands based on output. testfile contents: password requisite pam_cracklib.so lcredit=-1 ucredit=-1 ocredit=-1 script: D="dcredit=-1" if then echo $D exists else echo $D doesnt... (8 Replies)
Discussion started by: bludhemn
8 Replies

7. Red Hat

Moving of file content to another two files after searching with specific pattern

Hello, Please help me with this!! Thanks in advance!! I have a file named file.gc with the content: 1-- Mon Sep 10 08:53:09 CDT 2012 2revoke connect from FR2261; 3delete from mkt_allow where grantee = 'FR2261'; 4grant connect to FR2261 with '******'; 5alter user FR2261 comment... (0 Replies)
Discussion started by: raosr020
0 Replies

8. Shell Programming and Scripting

Searching a large file for short tandem repeats

Hello, I am searching large (~25gb) DNA sequence data in fasta short read format: >ReadName ACGTACGTACGT... for short tandem repeats, meaning instances of any 2-6 character based run that are repeated in tandem a number of times given as an input variable. Seems like a reasonably simple... (3 Replies)
Discussion started by: ljk
3 Replies

9. Shell Programming and Scripting

Extract specific line in an html file starting and ending with specific pattern to a text file

Hi This is my first post and I'm just a beginner. So please be nice to me. I have a couple of html files where a pattern beginning with "http://www.site.com" and ending with "/resource.dat" is present on every 241st line. How do I extract this to a new text file? I have tried sed -n 241,241p... (13 Replies)
Discussion started by: dejavo
13 Replies

10. Shell Programming and Scripting

Bash : Checking Large file for specific lines

Morning .. I have a file with approximately 1000 lines. I want to check that the file contains, for example, 100 lines. Something like whats given below is ugly. And even if I create a function I have to call it 100 times. I may need to look through multiple files at times. Is there a... (4 Replies)
Discussion started by: sumguy
4 Replies
ANUBISADM(1)						      General Commands Manual						      ANUBISADM(1)

NAME
anubisadm - interface for GNU Anubis database administration SYNOPSIS
anubisadm anubisadm [COMMAND] [OPTIONS] URL DESCRIPTION
This manual page documents briefly the anubisadm command. anubisadm is a program for GNU Anubis database manipulation. OPTIONS
A summary of options is included below: COMMAND is one of: -c, --create Creates the database. -l, --list List the contents of an existing database. -a, --add Add a new record. -m, --modify Modify existing record. -r, --remove Remove existing record. --version Display program version number and exit. --help Display this help screen and exit. OPTION is one or more of: -i, --authid=STRING Specify the authid to operate upon. This option is mandatory with --add, --modify and --remove. It is optional when used with --list. -p, --password=STRING Specify the password for the authid. Mandatory with --add, --modify and --remove. -u, --user=STRING Specify the system user name corresponding to the given authid. Optional for --add, --modify and --remove. -f, --rcfile=STRING Specify the rc file to be used for this authid. Optional for --add, --modify and --remove. SEE ALSO
anubis(1), anubisusr(1), AUTHOR
anubisadm was written by The Anubis Team (read the AUTHORS file). This manual page was prepared by Krzysztof Burghardt <krzysztof@burghardt.pl>, for the Debian project (but may be used by others). 2007 Sep 09 ANUBISADM(1)
All times are GMT -4. The time now is 01:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy