Sponsored Content
Top Forums Shell Programming and Scripting How to make a quick search through a script? Post 302799921 by umarsatti on Sunday 28th of April 2013 08:05:15 AM
Old 04-28-2013
here you go

t1 --> File containing more than 300k reocrds i.e integer numbers
Code:
head t1
3028797272
3028797391
3028797459
3028797826
3028797879

t2* --> more than 40 files while each file has more than 1.8M records.
Code:
head t2_DAILY_SDP59.DUMP_subscriber.v3.csv
3048924971,3048924971,0,0,,0,1,2,0,0,0,0,0,0,1,1,1,13,13,,0.000000,1,2014-09-14,2012-09-29,,2014-09-14,0,0,2012-10-09,1,1,,0,0,0,0,0,0,0,0,0,0,0,2012-09-14
3069660757,3069660757,0,0,,1,1,2,0,0,0,0,0,0,1,1,1,13,13,,0.900000,1,2015-04-19,2015-04-19,,2015-04-19,0,0,2015-04-19,0,0,,0,0,0,0,0,0,0,0,0,0,0,2012-10-24
3038103705,3038103705,0,0,,1,1,2,1,0,0,0,0,0,1,1,1,26,26,,9.870000,1,2015-04-25,2015-04-25,,2015-04-25,0,0,2015-04-25,0,0,,0,0,0,0,0,0,0,0,0,0,0,2008-02-25
3038902927,3038902927,0,0,,1,1,2,1,0,0,0,0,0,1,1,1,13,13,,6.460000,1,2015-01-14,2015-01-14,,2015-01-14,0,0,2015-01-14,0,0,,0,0,0,0,0,0,0,0,0,0,0,2011-09-04


Last edited by Franklin52; 05-01-2013 at 03:37 AM.. Reason: Please use code tags
 

9 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Make the SEARCH button REALLY BIG

Neo, Maybe it would be best to make the search button/option more visible? I know when I came here the first time, I didn't really notice that option. Just an idea. It appears that some people either don't see it.. or the obvious, don't want to use it, but I'd suggest that it's more of the... (8 Replies)
Discussion started by: ober5861
8 Replies

2. UNIX for Dummies Questions & Answers

quick question vi word search

hi, while in vi, we use /string to look for the particular string. after that operation, the particular string is highlighted in yellow color. how do i take the highlight off? thanks so much. (1 Reply)
Discussion started by: hobiwhenuknowme
1 Replies

3. UNIX for Dummies Questions & Answers

search all file for particular text and make changes to line 3

Hi All, I am sitting on HPUX. I want to change the exit into #exit, which appears into 3red line of code in shell scripting, wondering how shell script to be called up to perform action. I have following code in all files. Now, I need to find the text exit and replace into #exit. #!/sbin/sh... (10 Replies)
Discussion started by: alok.behria
10 Replies

4. Shell Programming and Scripting

search between keywords and make a single line

have a very big file where need to format it like below example file: abcd today is great day; search keyword 'abcd' and append to it all words till we reach ; to make it a single line. output should look like. abcd today is great day; There are many occurrence of such... (2 Replies)
Discussion started by: giri4332
2 Replies

5. UNIX for Dummies Questions & Answers

How to make search on gmane?

Hello. How can I make a search on string "install script" on site gmane in comp.sysutils.backup.bacula.general. Any help is welcome (0 Replies)
Discussion started by: jcdole
0 Replies

6. Shell Programming and Scripting

Search pattern between two quotes and make 1 row

Hi All, My file cat file " test1 test1 " " test1 test1 test1 test1" "test1 test1 test1 test1 test1 test1 "How to achieve this i want the result: cat file test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 test1 Please use CODE (not QUOTE) tags as required by... (4 Replies)
Discussion started by: lxdorney
4 Replies

7. What is on Your Mind?

Updated Forum Search Index Min Word Length to 2 Chars and Added Quick Search Bar

Today I changed the forum mysql database to permit 2 letter searches: ft_min_word_len=2 I rebuilt the mysql search indexes as well. Then, I added a "quick search bar" at the top of each page. I have tested this and two letter searches are working; but it's not perfect,... (1 Reply)
Discussion started by: Neo
1 Replies

8. What is on Your Mind?

UserCP Prototype v0.53 Quick Search in Navbar

FYI. In version 0.53 of the new UserCP I am working on, the top navbar search works; but I'm still displaying the results in the main forums. I in the future, I may being to change this to display the results in the new UserCP. https://www.unix.com/members/1-albums225-picture1118.png (2 Replies)
Discussion started by: Neo
2 Replies

9. Web Development

Quick Fix for Google Search Console "Page is not mobile friendly"

Over the past 10 plus years, we have countless posts where the user did not use CODE tags or they used ICODE tags incorrectly. This has has the results of this site penalized by Google for having pages which are "not mobile friendly". So, working quietly in the background, in the thankless... (0 Replies)
Discussion started by: Neo
0 Replies
AUDITREDUCE(1)						    BSD General Commands Manual 					    AUDITREDUCE(1)

NAME
auditreduce -- select records from audit trail files SYNOPSIS
auditreduce [-A] [-a YYYYMMDD[HH[MM[SS]]]] [-b YYYYMMDD[HH[MM[SS]]]] [-c flags] [-d YYYYMMDD] [-e euid] [-f egid] [-g rgid] [-j id] [-m event] [-o object=value] [-r ruid] [-U] [-u auid] [-v] [file ...] DESCRIPTION
The auditreduce utility selects records from the audit trail files based on the specified criteria. Matching audit records are printed to the standard output in their raw binary form. If no file argument is specified, the standard input is used by default. Use the praudit(1) utility to print the selected audit records in human-readable form. The options are as follows: -A Select all records. -a YYYYMMDD[HH[MM[SS]]] Select records that occurred after or on the given datetime. -b YYYYMMDD[HH[MM[SS]]] Select records that occurred before the given datetime. -c flags Select records matching the given audit classes specified as a comma separated list of audit flags. See audit_control(5) for a description of audit flags. -d YYYYMMDD Select records that occurred on a given date. This option cannot be used with -a or -b. -e euid Select records with the given effective user ID or name. -f egid Select records with the given effective group ID or name. -g rgid Select records with the given real group ID or name. -j id Select records having a subject token with matching ID. -m event Select records with the given event name or number. This option can be used more then once to select records of multiple event types. See audit_event(5) for a description of audit event names and numbers. -o object=value file Select records containing path tokens, where the pathname matches one of the comma delimited extended regular expression con- tained in given specification. Regular expressions which are prefixed with a tilde ('~') are excluded from the search results. These extended regular expressions are processed from left to right, and a path will either be selected or deslected based on the first match. Since commas are used to delimit the regular expressions, a backslash ('') character should be used to escape the comma if it is a part of the search pattern. msgqid Select records containing the given message queue ID. pid Select records containing the given process ID. semid Select records containing the given semaphore ID. shmid Select records containing the given shared memory ID. -r ruid Select records with the given real user ID or name. -U Use unbuffered output. This option is automatically set when the input file is a character device (e.g. /dev/auditpipe), allowing records to be fully processed as they are generated. -u auid Select records with the given audit ID. -v Invert sense of matching, to select records that do not match. EXAMPLES
To select all records associated with effective user ID root from the audit log /var/audit/20031016184719.20031017122634: auditreduce -e root /var/audit/20031016184719.20031017122634 To select all setlogin(2) events from that log: auditreduce -m AUE_SETLOGIN /var/audit/20031016184719.20031017122634 Output from the above command lines will typically be piped to a new trail file, or via standard output to the praudit(1) command. Select all records containing a path token where the pathname contains /etc/master.passwd: auditreduce -o file="/etc/master.passwd" /var/audit/20031016184719.20031017122634 Select all records containing path tokens, where the pathname is a TTY device: auditreduce -o file="/dev/tty[a-zA-Z][0-9]+" /var/audit/20031016184719.20031017122634 Select all records containing path tokens, where the pathname is a TTY except for /dev/ttyp2: auditreduce -o file="~/dev/ttyp2,/dev/tty[a-zA-Z][0-9]+" /var/audit/20031016184719.20031017122634 SEE ALSO
praudit(1), audit_control(5), audit_event(5) HISTORY
The OpenBSM implementation was created by McAfee Research, the security division of McAfee Inc., under contract to Apple Computer Inc. in 2004. It was subsequently adopted by the TrustedBSD Project as the foundation for the OpenBSM distribution. AUTHORS
This software was created by McAfee Research, the security research division of McAfee, Inc., under contract to Apple Computer Inc. Addi- tional authors include Wayne Salamon, Robert Watson, and SPARTA Inc. The Basic Security Module (BSM) interface to audit records and audit event stream format were defined by Sun Microsystems. BSD
January 24, 2004 BSD
All times are GMT -4. The time now is 05:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy