Sponsored Content
Full Discussion: Grep by column-Please help!
Top Forums UNIX for Dummies Questions & Answers Grep by column-Please help! Post 302071450 by bobo on Wednesday 19th of April 2006 04:21:03 PM
Old 04-19-2006
Data Problems!

This syntax works great:

awk -F, '{ if ($6 == 52) print $0 }' input.txt

But I do have problems:

The data i have is SEPERATE by a ; not ,....Please have with this minor issue.

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Grep by column number

I have a data file that is arranged like this: Marketing Ranjit Singh Eagles Dean Johnson FULL Marketing Ken Whillans Eagles Karen Thompson FULL Sales Peter RobertsonGolden TigersRich Gardener PART President Sandeep Jain Wimps Ken Whillans CONT... (7 Replies)
Discussion started by: hitman247m
7 Replies

2. Shell Programming and Scripting

Column grep

hi everyone, I am looking for an easy way to extract columns from a text file based on a regular expression, kind of like grep but searching and returning columns instead. for example, suppose i have the following file, 'file.txt': A B C D B 1 2 3 4 5 6 7 8 9 0 5 6 7 8 9 2 3 8 9 0 I... (6 Replies)
Discussion started by: css136
6 Replies

3. Shell Programming and Scripting

Grep but ignore first column

Hi, I need to perform a grep from a file, but ignore any results from the first column. For simplicity I have changed the actual data, but for arguments sake, I have a file that reads: MONACO Monaco ASMonaco MANUTD ManUtd ManchesterUnited NEWCAS NewcastleUnited NAC000 NAC ... (5 Replies)
Discussion started by: danhodges99
5 Replies

4. Shell Programming and Scripting

Grep 5 biggest column

please help, file1.txt id,week,ict,outgoing_call,blackberry_problem,gprs_problem,sms_problem,flash_problem,sinyal_lemah,blankspot,incoming_call,mms_problem,kualitas_suara,drop_call,data_probl em,cross_connect,connect_no_voice,vas_problem ,1,sumbagsel,96,127,52,70,28,29,21,18,18,8,5,3,0,0,3... (1 Reply)
Discussion started by: radius
1 Replies

5. Shell Programming and Scripting

How to awk or grep the last column in file when date on column contains spaces?

Hi have a large spreadsheet which has 4 columns APM00111803814 server_2 96085 Corp IT Desktop and Apps APM00111803814 server_2 96085 Corp IT Desktop and Apps APM00111803814 server_2 96034 Storage Mgmt Team APM00111803814 server_2 96152 GWP... (6 Replies)
Discussion started by: kieranfoley
6 Replies

6. UNIX for Dummies Questions & Answers

Grep -v value in 2nd column

Trying to do a grep -v on a value in the 2nd column of text. So if the word apple appears in a line in the 2nd column, it would not show up when the file was cat. Seems like a simple enough operation but I just can't figure it out. Any help would be appreciated. Thanks in advance. Are apples... (4 Replies)
Discussion started by: jimmyf
4 Replies

7. Shell Programming and Scripting

How to grep from the third column?

PROL\tests_li004_developers:VAS:3543346:q34243,d3hs35,34bdf3,24sfgg,a3s234 Im trying to grep all text after VAS:3543346, so im trying to just have this q34243,d3hs35,34bdf3,24sfgg,a3s234 Im confused on how I would do this (7 Replies)
Discussion started by: ajetangay
7 Replies

8. Shell Programming and Scripting

Can grep a specific column?

Hello All I have an input file with data below. I would like to grep and display the data where 3rd column contains string or at least one character. Kindly please help me with this! Input: tjfa3|zznpou|224fdd.34.ff3.35 |Tiv|Otj|1 fgduul7|zznikj| ... (7 Replies)
Discussion started by: DoveLu
7 Replies

9. UNIX for Beginners Questions & Answers

Grep A Column Based On Column Name

I have a file with two columns separated by white space. Dog Cat fido sneaky dopey poptart ears whisker barky herd Trying to list the words under the column named Dog. Tried a few variations of awk but can't... (4 Replies)
Discussion started by: jimmyf
4 Replies

10. Shell Programming and Scripting

Grep values from column 2 in reference of column 1

Gents Is it possible to update the code to get the desired output files from the input list. I called variable to the first column. I need to consider the first column as key to grep the values in the second column according to the desired request. input list (attached ) output1 ... (12 Replies)
Discussion started by: jiam912
12 Replies
quota(2)							System Calls Manual							  quota(2)

Name
       quota - manipulate disk quotas

Syntax
       #include <sys/types.h>
       #include <sys/param.h>
       #include <sys/quota.h>

       quota(cmd, uid, arg, addr)
       int cmd, uid, arg;
       caddr_t addr;

Description
       The  call manipulates disk quotas for file systems that have had quotas enabled with The cmd parameter indicates a command in the following
       list that is applied to the user ID uid.  The arg parameter is a command specific argument and addr is the address of an optional,  command
       specific  data  structure,  which  is copied in or out of the system.  The interpretation of arg and addr is given with each command in the
       list that follows:

       Q_SETDLIM
	      Set disk quota limits and current usage for the user with ID uid.  The arg parameter is a major-minor device indicating a particular
	      file  system.   The addr parameter is a pointer to a struct dqblk structure, defined in <sys/quota.h>.  Only the superuser can issue
	      this call.

       Q_GETDLIM
	      Get disk quota limits and current use for the user with ID uid.  The remaining parameters are identical  to  the	Q_SETDLIM  command
	      parameters.

       Q_SETDUSE
	      Set  disk  use limits for the user with ID uid.  The arg parameter is a major-minor device indicating a particular file system.  The
	      addr is a pointer to a struct dqusage structure, defined in <sys/quota.h>.  Only the superuser can issue this call.

       Q_SYNC Update the on-disk copy of quota uses.  The uid, arg, and addr parameters are ignored.

       Q_SETUID
	      Change the calling process's quota limits to those of the user with ID uid.  The arg and addr  parameters  are  ignored.	 Only  the
	      superuser can issue this call.

       Q_SETWARN
	      Alter  the disk usage warning limits for the user with ID uid.  The arg is a major-minor device indicating a particular file system.
	      The addr parameter is a pointer to a struct dqwarn structure, which is defined in <sys/quota.h>.	Only the superuse can  issue  this
	      call.

       Q_DOWARN
	      Warn  the user with user ID uid about excessive disk use.  This call causes the system to check its current disk use information and
	      print a message on the terminal of the caller for each file system on which the user is over quota.  If the arg parameter is  speci-
	      fied  as	NODEV,	all  file systems that have disk quotas are checked.  Otherwise, arg indicates a specific major-minor device to be
	      checked.	Only the superuser can issue this call.

Return Values
       A successful call returns 0 and, possibly, more information specific to the command specified in the cmd parameter; when an  error  occurs,
       the value -1 is returned and the global variable errno is set to indicate the reason.

Diagnostics
       A quota call fails when one of the following occurs:

       [EINVAL]       The kernel has not been compiled with the QUOTA option.

       [EINVAL]       The cmd parameter is invalid.

       [ESRCH]	      No disk quota is found for the indicated user.

       [EPERM]	      Only the superuser can issue the call and the caller is not the superuser.

       [ENODEV]       The arg parameter is being interpreted as a major-minor device, and it indicates an unmounted file system.

       [EFAULT]       An invalid addr parameter is supplied; the associated structure could not be copied in or out of the kernel.

       [EUSERS]       The quota table is full.

See Also
       "Disk Quotas in a UNIX Environment", ULTRIX Supplementary Documents, Volume 3:System Manager

																	  quota(2)
All times are GMT -4. The time now is 07:56 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy