hi Friends
need to compare columns in one file where the data looks like below
want to get output as
need to seach $2 in array of $1 and if found print the $2 of the found...
if not print as it is
Last edited by Scott; 11-10-2012 at 08:20 AM..
Reason: Code tags
I am new to unix and awk/sed etc... using C-Shell.
Basically, I have a fixed length file that has 4 different record types on it, H, D, V, W all in column 1. I need to change all the W's in column 1 to D's. in the entire file. The W's can be anywhere in the file and must remain in the same... (3 Replies)
Find in first column and replace the line with Awk, and output new file
File1.txt"2011-11-02","Georgia","Atlanta","x","",""
"2011-11-03","California","Los Angeles","x","",""
"2011-11-04","Georgia","Atlanta","x","x","x"
"2011-11-05","Georgia","Atlanta","x","x","" ... (4 Replies)
I would like to compare the values of 2nd column of consecutive lines of same file in such a way so that if the difference between first value and second value is more than 100 it should print complete line else ignore line.
Input File
==========
PDB 2500
RTDB 123
RTDB-EAGLE 122
VSCCP 2565... (4 Replies)
Hi,
I know that this topic has been discussed in the past and I've tried to follow all the guidelines. Anyhow, I following describe my problem.
I have a file (file1 , no. records = 67) containing pairs of IP addresses as follows (with single space as delimiter between the fields):
example... (5 Replies)
Hi All,
I have 2 files in the following format :
File 1
S00999999|BHANU|TEST|007 JOHN DOE APT 999||VENGA HIGHWAY|MA|09566|SCO DUAL|20140201|20140331|20140401|20140630|20140327|
S00888888|BU|TES|009 JOHN DOE APT 909||SENGA HIGHWAY|MA|08566|SCO... (1 Reply)
Dear Unix experts,
I have got a file where I would like to compare the values of second column if first column is same in such a way that the difference between the values is >50. If not, I would like to discard both values.
For example, my input file looks like -
comp275_c0_seq2 73... (7 Replies)
Hello,
I am trying to make a awk code that will take 2 files, a txt file like this :
1 1 88 c(1:38, 42, 102)
2 2 128 c(39:41, 43:101, 103:105, 153, 155:189, 292, 344:369)
3 3 84 c(190:249, 603, 606:607, 609:629)
4 4 12 ... (8 Replies)
Example:
I have files in below format
file 1:
zxc,133,joe@example.com
cst,222,xyz@example1.com
File 2 Contains:
hxd
hcd
jws
zxc
cst
File 1 has 50000 lines and file 2 has around 30000 lines :
Expected Output has to be :
hxd
hcd
jws (5 Replies)
I have a csv which has lot of columns . I was looking for an awk script which would extract a column twice. for the first occurance the header and data needs to be intact but for the second occurance i want to replace the header name since it a duplicate and extract year value which is in ddmmyy... (10 Replies)
Discussion started by: Kunalcurious
10 Replies
LEARN ABOUT REDHAT
revoke
REVOKE(7) SQL Commands REVOKE(7)NAME
REVOKE - remove access privileges
SYNOPSIS
REVOKE { { SELECT | INSERT | UPDATE | DELETE | RULE | REFERENCES | TRIGGER }
[,...] | ALL [ PRIVILEGES ] }
ON [ TABLE ] tablename [, ...]
FROM { username | GROUP groupname | PUBLIC } [, ...]
REVOKE { { CREATE | TEMPORARY | TEMP } [,...] | ALL [ PRIVILEGES ] }
ON DATABASE dbname [, ...]
FROM { username | GROUP groupname | PUBLIC } [, ...]
REVOKE { EXECUTE | ALL [ PRIVILEGES ] }
ON FUNCTION funcname ([type, ...]) [, ...]
FROM { username | GROUP groupname | PUBLIC } [, ...]
REVOKE { USAGE | ALL [ PRIVILEGES ] }
ON LANGUAGE langname [, ...]
FROM { username | GROUP groupname | PUBLIC } [, ...]
REVOKE { { CREATE | USAGE } [,...] | ALL [ PRIVILEGES ] }
ON SCHEMA schemaname [, ...]
FROM { username | GROUP groupname | PUBLIC } [, ...]
DESCRIPTION
REVOKE allows the creator of an object to revoke previously granted permissions from one or more users or groups of users. The key word
PUBLIC refers to the implicitly defined group of all users.
Note that any particular user will have the sum of privileges granted directly to him, privileges granted to any group he is presently a
member of, and privileges granted to PUBLIC. Thus, for example, revoking SELECT privilege from PUBLIC does not necessarily mean that all
users have lost SELECT privilege on the object: those who have it granted directly or via a group will still have it.
See the description of the GRANT [grant(7)] command for the meaning of the privilege types.
NOTES
Use psql(1)'s z command to display the privileges granted on existing objects. See also GRANT [grant(7)] for information about the format.
EXAMPLES
Revoke insert privilege for the public on table films:
REVOKE INSERT ON films FROM PUBLIC;
Revoke all privileges from user manuel on view kinds:
REVOKE ALL PRIVILEGES ON kinds FROM manuel;
COMPATIBILITY
SQL92
The compatibility notes of the GRANT [grant(7)] command apply analogously to REVOKE. The syntax summary is:
REVOKE [ GRANT OPTION FOR ] { SELECT | INSERT | UPDATE | DELETE | REFERENCES }
ON object [ ( column [, ...] ) ]
FROM { PUBLIC | username [, ...] }
{ RESTRICT | CASCADE }
If user1 gives a privilege WITH GRANT OPTION to user2, and user2 gives it to user3 then user1 can revoke this privilege in cascade using
the CASCADE keyword. If user1 gives a privilege WITH GRANT OPTION to user2, and user2 gives it to user3, then if user1 tries to revoke
this privilege it fails if he specifies the RESTRICT keyword.
SEE ALSO
GRANT [grant(7)]
SQL - Language Statements 2002-11-22 REVOKE(7)