This is just
Some implementations may use fgrep instead though, depending what flags are supported.
The code in the previous post could be very slow depending on the data volumes, however it could be adapted to include the square brackets or force other conditions on the search for the string. It depends what you are actually after.
U r Right
fgrep is faster here while running this compared as comapred to grep
Thanks
I hope that this helps. Let us all know if I have missed the point.
Robin
Liverpool/Blackburn
UK
---------- Post updated at 06:13 AM ---------- Previous update was at 06:12 AM ----------
Quote:
Originally Posted by rbatte1
This is just
Some implementations may use fgrep instead though, depending what flags are supported.
The code in the previous post could be very slow depending on the data volumes, however it could be adapted to include the square brackets or force other conditions on the search for the string. It depends what you are actually after.
I hope that this helps. Let us all know if I have missed the point.
Robin
Liverpool/Blackburn
UK
U r Right
fgrep is faster here while running this compared as comapred to grep
Thanks
suppose i have one file
file A
18
24
30
35
38
45
55
Another file file B
08_46 A 16 V -0.36 0.23 E : 1.41
08_46 A 17 D -1.04 0.22 E : 0.84
08_46 A 18 Q -0.49 0.12 E : 0.06
08_46 A 19 G 0.50 0.14 E : 0.05
08_46 A 20 V ... (5 Replies)
hey guys, I have two files both with two columns, I have already created an
awk code to ignore certain lines (e.g lines that start with 963) as they wou
ld begin with a certain string, however, the rest I have added together and
calculated the average.
At the moment the code also displays... (3 Replies)
Hi guys,
I need some help to come out with a solution . I have seven such files but I am showing only three for convenience.
filea
a5 20
a8 16
fileb
a3 42
a7 14
filec
a5 23
a3 07
The output file shoud contain the data in table form showing first field of... (7 Replies)
Hello,
I am strugling from quite a some time to compare flat files with over 1 million records could anyone please help me.
I want to compare two pipe delimited flat files, file1 with file2 and output the unmatched rows from file2 in file3
Sample File1:
... (9 Replies)
All,
PLease can you help me with a shell script which can compare two xml files and print the difference to a output file.
I have attached one such file for you reference.
<Group>
<Member ID=":Year_Quad:41501" childCount="4" fullPath="PEPSICO Year-Quad-Wk : FOLDER.52 Weeks Ending Dec... (2 Replies)
What is the best way (bash/awk/sed?) to read in two text files and do a keyword search/replace?
file1.txt:
San Francisco
Los Angeles
Seattle
Dallas
file2.txt:
I love Los Angeles.
Coming to Dallas was the right choice.
San Francisco is fun.
Go to Seattle in the summer.
... (3 Replies)
Hi,
I have multiple files that each contain one column of strings:
File1:
123abc
456def
789ghi
File2:
123abc
456def
891jkl
File3:
234mno
123abc
456def
In total I have 25 of these type of file. (5 Replies)
Hi
I want to implement something like this:
if( keyword1 exists)
then
check if(keyword2 exists in the same line)
then replace keyword 2 with New_Keyword
else
Add New_Keyword at the end of line
end if
eg:
Check for Keyword JUNGLE and add/replace... (7 Replies)
GOODNUMBERS="1 2 3 4 5 6 3 3 34 34 5 66 12"
BADNUMBERS="7 3 12 5 66"
for eachnum in `echo ${GOODNUMBERS}`
do
echo ${BADNUMBERS} | gawk -v threshold=${eachnum} '$1 != threshold'
done
what im trying to do with the above is, i want to print numbers that are in the GOODNUMBERS... (10 Replies)
Hi All,
i am trying to compare two files in Centos 6.
F1: /tmp/d21
NAME="xvda" TYPE="disk" SIZE="40G" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT=""
NAME="xvda1" TYPE="part" SIZE="500M" OWNER="root" GROUP="disk" MODE="brw-rw----" MOUNTPOINT="/boot"
NAME="xvda2" TYPE="part"... (2 Replies)
Discussion started by: balu1234
2 Replies
LEARN ABOUT FREEBSD
rcorder
RCORDER(8) BSD System Manager's Manual RCORDER(8)NAME
rcorder -- print a dependency ordering of interdependent files
SYNOPSIS
rcorder [-k keep] [-s skip] file ...
DESCRIPTION
The rcorder utility is designed to print out a dependency ordering of a set of interdependent files. Typically it is used to find an execu-
tion sequence for a set of shell scripts in which certain files must be executed before others.
Each file passed to rcorder must be annotated with special lines (which look like comments to the shell) which indicate the dependencies the
files have upon certain points in the sequence, known as ``conditions'', and which indicate, for each file, which ``conditions'' may be
expected to be filled by that file.
Within each file, a block containing a series of ``REQUIRE'', ``PROVIDE'', ``BEFORE'' and ``KEYWORD'' lines must appear. The format of the
lines is rigid. Each line must begin with a single '#', followed by a single space, followed by ``PROVIDE:'', ``REQUIRE:'', ``BEFORE:'', or
``KEYWORD:''. No deviation is permitted. Each dependency line is then followed by a series of conditions, separated by whitespace. Multi-
ple ``PROVIDE'', ``REQUIRE'', ``BEFORE'' and ``KEYWORD'' lines may appear, but all such lines must appear in a sequence without any interven-
ing lines, as once a line that does not follow the format is reached, parsing stops.
The options are as follows:
-k Add the specified keyword to the ``keep list''. If any -k option is given, only those files containing the matching keyword are
listed.
-s Add the specified keyword to the ``skip list''. If any -s option is given, files containing the matching keyword are not listed.
An example block follows:
# REQUIRE: networking syslog
# REQUIRE: usr
# PROVIDE: dns nscd
This block states that the file in which it appears depends upon the ``networking'', ``syslog'', and ``usr'' conditions, and provides the
``dns'' and ``nscd'' conditions.
A file may contain zero ``PROVIDE'' lines, in which case it provides no conditions, and may contain zero ``REQUIRE'' lines, in which case it
has no dependencies. There must be at least one file with no dependencies in the set of arguments passed to rcorder in order for it to find
a starting place in the dependency ordering.
DIAGNOSTICS
The rcorder utility may print one of the following error messages and exit with a non-zero status if it encounters an error while processing
the file list.
Requirement %s has no providers, aborting. No file has a ``PROVIDE'' line corresponding to a condition present in a ``REQUIRE'' line in
another file.
Circular dependency on provision %s, aborting. A set of files has a circular dependency which was detected while processing the stated con-
dition.
Circular dependency on file %s, aborting. A set of files has a circular dependency which was detected while processing the stated file.
SEE ALSO rc(8)HISTORY
The rcorder utility first appeared in NetBSD 1.5.
AUTHORS
Written by Perry E. Metzger <perry@piermont.com> and Matthew R. Green <mrg@eterna.com.au>.
BUGS
The ``REQUIRE'' keyword is misleading: It doesn't describe which daemons have to be running before a script will be started. It describes
which scripts must be placed before it in the dependency ordering. For example, if your script has a ``REQUIRE'' on ``named'', it means the
script must be placed after the ``named'' script in the dependency ordering, not necessarily that it requires named(8) to be started or
enabled.
BSD August 5, 2011 BSD