and wanted to pull the 'users' netgroups returned into a perl array, that will look like this
I would pretty happy with how to do it if everything in the string was a users_* split by a comma, but because I have the 'steven.*' with a space after it it falls over a bit,
does anyone know how I can only include the bits of the string that start with 'users_' into my array, excluding everything else? so effectively only buildng an array from the red bits below
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 SUSE
revnetgroup
REVNETGROUP(8) NIS Reference Manual REVNETGROUP(8)NAME
revnetgroup - generate reverse netgroup data
SYNOPSIS
/usr/lib/yp/revnetgroup [-u | -h]
DESCRIPTION
Revnetgroup processes the standard input 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 NIS maps. These reverse
netgroup maps are used to help speed up netgroup lookups, particularly for the innetgr() library function.
The revnetgroup command prints its results on the standard output. It is usually called only by /var/yp/Makefile when rebuilding the NIS
netgroup maps.
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.
FILES
/var/yp/Makefile
The Makefile to build the NIS databases.
/etc/netgroup
The default netgroup database file. This file is most often found only on the NIS master server.
SEE ALSO getnetgrent(3), netgroup(5),
AUTHOR
revnetgroup was written by Thorsten Kukuk <kukuk@linux-nis.org>.
NIS Reference Manual 09/26/2007 REVNETGROUP(8)