Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Re: How To Use UNIQ UNIX Command On single Column Post 302547717 by anudeepkumar123 on Tuesday 16th of August 2011 11:53:25 AM
Old 08-16-2011
Re: How To Use UNIQ UNIX Command On single Column

Hi ,

Can You Please let Know How use unix uniq command on a single column for deleting records from file

with Below Structure.Pipe Delimter File .

Source

Name | Account_Id
A | 101
B | 201
C | 301
A | 102
D | 401
C | 301

Based On The Name Column I Want To Delete Record

Target
Name Account_Id
A | 101
B | 201
C | 301
D | 401

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (0 Replies)
Discussion started by: bosskr
0 Replies

2. HP-UX

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (1 Reply)
Discussion started by: bosskr
1 Replies

3. UNIX for Dummies Questions & Answers

run command Unix on a single line

Hi everybody.. I need to enter in bash mode and then run a command and this just in a single command line. I tried : "bash ^M| somecommand" but nothing.. How do I do to simulate the return button just right after the bash command ? Thanks.. (8 Replies)
Discussion started by: Riddick61
8 Replies

4. Shell Programming and Scripting

Column sum group by uniq records

Dear All, I want to get help for below case. I have a file like this. saman 1 gihan 2 saman 4 ravi 1 ravi 2 so i want to get the result, saman 5 gihan 2 ravi 3 like this. Pls help me. (17 Replies)
Discussion started by: Nayanajith
17 Replies

5. Shell Programming and Scripting

Multiple lines in a single column to be merged as a single line for a record

Hi, I have a requirement with, No~Dt~Notes 1~2011/08/1~"aaa bbb ccc ddd eee fff ggg hhh" Single column alone got splitted into multiple lines. I require the output as No~Dt~Notes 1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh" mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies

6. Shell Programming and Scripting

Uniq count second column

Hello How can I get a number of occurrence count for this file; ERR315389.1000156 CTTGAAGAAGAATTGAAAACTGTGACGAACAACTTGAAGTCACTGGAGGCTCAGGCTGAGAAGTACTCGCAGAAGGAAGACAGATATGAGGAAGAG ERR315389.1000281 ... (3 Replies)
Discussion started by: Wan Fahmi
3 Replies

7. Shell Programming and Scripting

Paste 2 single column files to a single file

Hi, I have 2 csv/txt files with single columns. I am trying to merge them using paste, but its not working.. output3.csv: flowerbomb everlon-jewelry sofft steve-madden dolce-gabbana-watchoutput2.csv: http://www1.abc.com/cms/slp/2/Flowerbomb http://www1.abc.com/cms/slp/2/Everlon-Jewelry... (5 Replies)
Discussion started by: ajayakunuri
5 Replies

8. Shell Programming and Scripting

Bring values in the second column into single line (comma sep) for uniq value in the first column

I want to bring values in the second column into single line for uniq value in the first column. My input jvm01, Web 2.0 Feature Pack Library jvm01, IBM WebSphere JAX-RS jvm01, Custom01 Shared Library jvm02, Web 2.0 Feature Pack Library jvm02, IBM WebSphere JAX-RS jvm03, Web 2.0 Feature... (10 Replies)
Discussion started by: kchinnam
10 Replies

9. Shell Programming and Scripting

HELP - uniq values per column

Hi All, I am trying to output uniq values per column. see file below. can you please assist? Thank you in advance. cat names joe allen ibm joe smith ibm joe allen google joe smith google rachel allen google desired output is: joe allen google rachel smith ibm (5 Replies)
Discussion started by: Apollo
5 Replies

10. UNIX for Beginners Questions & Answers

Get first column value uniq

Hi All, I have a directory and sub-directory that having ‘n' number of .log file in nearly 1GB. The file is comma separated file. I need to recursively grep and uniq first column values only. I did in perl. But i wish to know more command line utilities to calculate the time for grep and... (4 Replies)
Discussion started by: k_manimuthu
4 Replies
ns_return(3aolserver)					    AOLserver Built-In Commands 				     ns_return(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
ns_connsendfp, ns_respond, ns_return, ns_returnadminnotice, ns_returnbadrequest, ns_returnerror, ns_returnfile, ns_returnforbidden, ns_returnfp, ns_returnnotfound, ns_returnnotice, ns_returnredirect, ns_returnunauthorized, ns_write - commands SYNOPSIS
ns_connsendfp fp len ns_respond ns_return status type string ns_returnadminnotice status msg ?longmsg? ns_returnbadrequest reason ns_returnerror status msg ns_returnfile status type filename ns_returnforbidden ns_returnfp status type fileid len ns_returnnotfound ns_returnnotice status msg ?longmsg? ns_returnredirect location ns_returnunauthorized ns_write string _________________________________________________________________ DESCRIPTION
These procedures provide a simple interface for returning information to the client. They build HTTP/1.0 headers and send the appropriate data out the socket to the client. The script does not end at the time ns_return* is invoked so you can continue processing data after the client has gotten the data and closed the socket. type should be a MIME type (see ns_guesstype manual page for a list). status is a three-digit number fitting the pattern below: 1xx Infor- mational - Not used, but reserved for future use. 2xx Success - The action was successfully received, understood, and accepted. 3xx Redi- rection - Further action must be taken in order to complete the request. 4xx Client Error - The request contains bad syntax or cannot be fulfilled. 5xx Server Error - The server failed to fulfill an apparently valid request. Some common status values and their meanings are: 201 Created 202 Accepted 203 Provisional Information 204 No Content 300 Multiple Choices 301 Moved Permanently 302 Moved Temporarily 303 Method 304 Not Modified 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 None Acceptable 407 Proxy Authentication Required 408 Request Time-out 409 Conflict 410 Gone 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Time-out ns_connsendfp This function writes len bytes of the specified channel or file to the conn. ns_return Sends back both the headers and the string. ns_returnadminnotice Wraps the text msg and longmsg in some html, appends a line with a link to "mailto:serveradministrator" based on the virtual server parameter "WebMaster". ns_returnbadrequest Returns a 400 status code and a formatted HTML message containing the reason text. ns_returnerror Wraps the text msg in some html and returns that to the client. ns_returnfile Sends back the headers and the contents of the file. ns_returnforbidden Returns a 403 status code. ns_returnfp First sends the appropriate headers. Next, it writes out the contents of file from the current file position until the end of the file. ns_returnnotfound Returns a 404 status code. ns_returnnotice Wraps teh text msg and longmsg in some html and returns that to the client. ns_returnredirect Returns a redirect to the passed in location ns_returnunauthorized Returns a 401 status code ns_write Writes the string out the connection. You can use it instead of the ns_return or ns_respond functions to build HTTP responses. AOLserver will not include the usual headers on the output data. The script does not end at the time ns_write* is invoked so you can continue processing data after the client has gotten the data and closed the socket. SEE ALSO
ns_respond(n), ns_writefp(n) KEYWORDS
AOLserver 4.0 ns_return(3aolserver)
All times are GMT -4. The time now is 11:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy