Assuming that your input file line lengths don't exceed LINE_MAX limits on your system, the following seems to do what you want:
If you want to run this on a Solaris/SunOS system, change awk to /usr/xpg4/bin/awk, /usr/xpg6/bin/awk, or nawk.
PS Is there anything in this script you don't understand?
Last edited by Don Cragun; 11-07-2013 at 08:37 PM..
Reason: Add note.
This User Gave Thanks to Don Cragun For This Post:
Hi,
I am new to unix and I need help in solving below mentioned issue, really appreciate ur help.
I have a file
sam, john, 2324, 07142007
tom, thomson, 2343, 07142007
john, scott, 2478, 07142007
its a comma delimited file, I need to extract the last column from each line and this... (4 Replies)
Hi All,
Below is the sample data of my files:
O|A|571000689|D|S|PNH|S|SI
sadm|ibscml1x|
I|A|571000689|P|S|PNH|S|SI
sadm|ibscml1x|
O|A|571000689|V|S|PNH|S|SI
sadm|ibscml1x|
S|C|CAM|D|S|PNH|R|ZOA|2004
bscml1x| ... (3 Replies)
Hi Friends,
I have a file with the following values..
xyz.txt,12345.xml
abc.txt,04567.xml
cde.txt,12134.xml
I would like to extract all the 2nd column values twice as shown in the example like
12345,12345.xml
04567,04567.xml
12134,12134.xml
Please advice!!
In the formus one of... (7 Replies)
Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
Hi everybody
I have some problems with PERL programming.
I have a file with two columns, both with numeric values.
I have to extract the values > 50 from the 2nd columns and sum them among them.
The I have to sum the respective values in the first column on the same line and, at the end, I... (6 Replies)
Hello,
I have 2 columns (1st column has multiple entries but the corresponding values in the column 2 may be the same or different.) however I want to extract unique values for each entry in column 1 by assigning the max value from column 2
SDF4 -0.211654
SDF4 0.978068
... (1 Reply)
Hello All,
Could you please help with this.
This is what I have:
506234.222 2
506234.222 2
506234.222 2
506234.222 2
508212.200 2
508212.200 2
333456.111 2
333456.111 2
333456.111 2
333456.111 2
But this is what I want:
506234.222 1
506234.222 2
506234.222 2
506234.222 3 (5 Replies)
Hi all:
quick question!
I have the following data that resembles some thing like this:
i am tired
tired am i
what is up
hello people cool
I want to count (or at least isolate) all of the unique elements in the 2nd column.
I have tried this:
cut -f 2 | uniq 'input'
which does... (3 Replies)
File2 is tab-delimeted and I am trying to use $2 in file1 (space delimeted) as a search term in file2. If it is found then the AF= in and the FDP= values from file2 are extracted and printed next to the file1 line. I commented the awk before I added the lines in bold the current output resulted. I... (7 Replies)
In the below perl I am trying to extract and print the values AF1=, the GT value, and F or QUAL diveded by 33 (rounded to the nearest whole #). The GT value is at the end after the GT:PL so all the possibilities are read into a hash h, then depending on the value that is in the line the... (1 Reply)
Discussion started by: cmccabe
1 Replies
LEARN ABOUT REDHAT
edquota
EDQUOTA(8) System Manager's Manual EDQUOTA(8)NAME
edquota - edit user quotas
SYNOPSIS
edquota [ -p protoname ] [ -u | -g ] [ -r ] [ -F format-name ] [ -f filesystem ] username...
edquota [ -u | -g ] [ -F format-name ] [ -f filesystem ] -t
DESCRIPTION
edquota is a quota editor. One or more users or groups may be specified on the command line. For each user or group a temporary file is
created with an ASCII representation of the current disk quotas for that user or group and an editor is then invoked on the file. The quo-
tas may then be modified, new quotas added, etc. Setting a quota to zero indicates that no quota should be imposed.
Users are permitted to exceed their soft limits for a grace period that may be specified per filesystem. Once the grace period has
expired, the soft limit is enforced as a hard limit.
The current usage information in the file is for informational purposes; only the hard and soft limits can be changed.
Upon leaving the editor, edquota reads the temporary file and modifies the binary quota files to reflect the changes made.
The editor invoked is vi(1) unless either the EDITOR or the VISUAL environment variable specifies otherwise.
Only the super-user may edit quotas.
OPTIONS -r Edit also non-local quota use rpc.rquotad on remote server to set quota. The -n option is equivalent, and is maintained for back-
ward compatibility.
-u Edit the user quota. This is the default.
-g Edit the group quota.
-p protoname
Duplicate the quotas of the prototypical user specified for each user specified. This is the normal mechanism used to initialize
quotas for groups of users.
-F format-name
Edit quota for specified format (ie. don't perform format autodetection). Possible format names are: vfsold (version 1 quota),
vfsv0 (version 2 quota), rpc (quota over NFS), xfs (quota on XFS filesystem)
-f filesystem
Perform specified operations only for given filesystem (default is to perform operations for all filesystems with quota).
-t Edit the soft time limits for each filesystem. In old quota format if the time limits are zero, the default time limits in
<linux/quota.h> are used. In new quota format time limits must be specified (there is no default value set in kernel). Time units of
seconds, minutes, hours, days, weeks, and months are understood. Time limits are printed in the greatest possible time unit such
that the value is greater than or equal to one.
FILES
aquota.user or aquota.group
quota file at the filesystem root (version 2 quota, non-XFS filesystems)
quota.user or quota.group
quota file at the filesystem root (version 1 quota, non-XFS filesystems)
/etc/mtab mounted filesystems table
SEE ALSO quota(1), vi(1), quotactl(2), quotacheck(8), quotaon(8), repquota(8)EDQUOTA(8)