All,
I have a field in a comma seperated file with hundreds of lines and about 20 columns and I wish to remove all numbers after the decimal point in field 4 on each line and output the rest to another file or write it back to itself.
File is like this
20070126, 123.0, GBP, 1234.5678,... (9 Replies)
Hi,
I need to split xml-files with sizes greater than 2 gb into smaler chunks. As I dont want to end up with billions of files, I want those splitted files to have configurable sizes like 250 MB. Each file should be well formed having an exact copy of the header (and footer as the closing of the... (0 Replies)
Let's say I have a very long string with no spaces but just words stored in $very_long_string.
$very_long_string = "aaaaaaaaaaabbbbbbbbbbbccccccccccccdddddddddddd";
I can do this to split the string into 1 character each and store them in an array:
@myArray = split(//, $very_long_string); ... (3 Replies)
How do I split a file into many parts but with different amounts of lines per part? I looked at the split command but that only splits evenly.
I'd like a range specified to determine how many lines each output file should have.
For example, if the input file has 1000 lines and the range is... (1 Reply)
How can i break a text file into parts that occur between a specific pattern?
I have text file having various xml many tags like which starts with the tag "<?xml version="1.0" encoding="utf-8"?>" . I have to break the whole file into several xmls by looking for the above pattern.
All the... (9 Replies)
How do you truncate specific parts of a string.
Example:
1 This is the string
Goal:
This is the string
As you can see I'm trying to simply remove the first two characters of the string the number one and the space between the one and the word "this."
Your help is appreciated.
... (8 Replies)
Hello. I need help with copying part of a file structure to another directory while still keeping the structure. For example look below:
../folder1/sub1/txt.txt
../folder1/sub2/pic.png
../folder2/sub1/pic.png
../folder2/sub2/txt.txt
So in this I would like to copy only the directories and... (3 Replies)
Hi all,
I desperately need a small script which deletes everything in a particular .txt file when "Abs = {" appears till "},", and also when "B-1 = {" appears till "},"
I would like all the text in between of those instances to be deleted, however, other text to be unedited (kept as it is).... (12 Replies)
I am trying to add a condition to the below perl that will capture the GTtag and place a specific string in the last field of each line. The problem is that the GT value used is not right after the tag rather it is a few fields away. The values should always be 0/1 or 1/2 and are in bold in the... (12 Replies)
Discussion started by: cmccabe
12 Replies
LEARN ABOUT OPENDARWIN
revnetgroup
REVNETGROUP(8) BSD System Manager's Manual REVNETGROUP(8)NAME
revnetgroup -- generate reverse netgroup data
SYNOPSIS
revnetgroup -u -h [-f netgroup_file]
DESCRIPTION
revnetgroup processes the contents of a file in netgroup(5) format into what is called reverse netgroup form. That is, where the original
file shows netgroup memberships in terms of which members reside in a particular group, the reverse netgroup format specifies what groups are
associated with a particular member. This information is used to generate the netgroup.byuser and netgroup.byhosts YP maps. These reverse
netgroup maps are used to help speed up netgroup lookups, particularly for the innetgr() library function.
For example, the standard /etc/netgroup file may list a netgroup and a list of its members. Here, the netgroup is considered the key and the
member names are the data. By contrast, the reverse netgroup.byusers database lists each unique member as the key and the netgroups to which
the members belong become the data. Seperate databases are created to hold information pertaining to users and hosts; this allows netgroup
username lookups and netgroup hostname lookups to be performed using independent keyspaces.
By constructing these reverse netgroup databases (and the corresponding YP maps) in advance, the getnetgrent(3) library functions are spared
from having to work out the dependencies themselves on the fly. This is important on networks with large numbers of users and hosts, since it
can take a considerable amount of time to process very large netgroup databases.
The revnetgroup command prints its results on the standard output. It is usually called only by /var/yp/<domain>/Makefile when rebuilding the
YP netgroup maps.
OPTIONS
The revnetgroup command supports the following options:
-u Generate netgroup.byuser output; only username information in the original netgroup file is processed.
-h Generate netgroup.byhost output; only hostname information in the original netgroup file is processed. (Note at least one of the -u or
-h flags must be specified.)
[-f netgroup_file]
The revnetgroup command uses /etc/netgroup as its default input file. The -f flag allows the user to specify an alternate input file.
Specifying ``-'' as the input file causes revnetgroup to read from the standard input.
FILES
/var/yp/<domain>Makefile The Makefile that calls makedbm and revnetgroup to build the YP databases.
/etc/netgroup The default netgroup database file. This file is most often found only on the YP master server.
SEE ALSO getnetgrent(3), yp(8), netgroup(5), makedbm(8)AUTHOR
Bill Paul <wpaul@ctr.columbia.edu>
BSD October 24, 1995 BSD