I have 20000 numbers present in a file in each line like
25663,
65465,
74579,
56446,
..
..
I have created a table in db with single number column in it.
create table testhari (no number(9));
I want to insert all these numbers into that table. how can i do it?
can anybody please... (4 Replies)
i have an awk statement which i am using to count the number of occurences of the number ,5, in the file:
awk '/,5,/ {count++}' TRY.txt | awk 'END { printf(" Total parts: %d",count)}'
i know there is a total of 10 matches..what is wrong here?
thanks (16 Replies)
Hi
Is there any command where we can insert a line "2|||" before every line starting with "3|"
my input is as follows
1|ETG|12345
3|79.58|||GBP||
1|ETG|12345
3|79.58|||GBP||
1|ETG|12345
2|EN_GB||Electrogalvanize 0.5 m2 ( Renault )
1|ETG|12345
3|88.51|||GBP||
desired output... (10 Replies)
To give you some context of my issue the following is some sample dummy data. The field delimiter is "<-->". The 4th field is going to be tags for my notes. The tags should always be unique and sorted alphabetically.
1<-->01/20/12<-->01/20/12<-->1st note<-->1st note<-NL->2 lines... (4 Replies)
Hi Guys ,
I Need to insert records into a file just above the last row .
like i have a file which has records as shown below :
00012919 7836049 S
00012920 7836049 S
00012921 3828157 Y
00012922 3828157 Y
00012923 3828157 S
T005290070331000012923
i want to... (1 Reply)
Please can you let me know how to print all the matching lines from a file in one single line using awk. Thanks
I have the following data in the input file
data1
voice2
voice1
speech1
data2
data3
...
...
voice4
speech2
data4
and the output should be as follows
data1 data2... (4 Replies)
To match range, the command is:
awk '/BEGIN/,/END/'
but what I want is the range is printed only if there is additional pattern that matches in the range itself? maybe like this:
awk '/BEGIN/,/END/ if only in that range there is /pattern/'
Thanks (8 Replies)
input:
!@#$%2QW5QWERTAB$%^&*
The string above is not separated (or FS="").
For clarity sake one could re-write the string by including a "|" as FS as follow:
!|@|#|$|%|2QW|5QWERT|A|B|$|%|^|&|*
Here, I am only interested in patterns (their numbers are variable between records) containing... (16 Replies)
Using the attached file, the below awk command results in the output below:
I can not seem to produce the desired results and need some expert help. Thank you :).
awk -F'' '
{
id += $4
value += $5
occur++
}
END{
printf "%-8s%8s%8s%8s\n", "Gene", "Targets", "Average Depth", "Average... (3 Replies)
Input data as below (filetest.txt):
1|22 JAN Minimum Bal 20.00 | SAT
2|09 FEB Extract bal 168.00BR | REM
3|MIN BAL | LEX
Output should be:
( If there is Date & Month in 2nd field of Input file, It should be seperated else blank. If There is Decimal OR Decimal & Currency in last of the 2nd... (7 Replies)
Discussion started by: JSKOBS
7 Replies
LEARN ABOUT OSX
auditreduce
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 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 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