Sponsored Content
Operating Systems Linux How to remove lines without a particular string in either column? Post 302958066 by RavinderSingh13 on Monday 19th of October 2015 06:11:28 AM
Old 10-19-2015
Hello Syeda,

Could you please try following and let me know if this helps.
Code:
awk '{count=gsub(/refseq:NP/,"refseq:NP",$0);if(count==NF){print}}'  Input_file

Output will be as follows.
Code:
DIP-23436N|refseq:NP_536784       DIP-23130N|refseq:NP_652017
DIP-22958N|refseq:NP_651195       DIP-20072N|refseq:NP_724597
DIP-22928N|refseq:NP_569972       DIP-22042N|refseq:NP_536744|uniprotkb:P54622

Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to remove a string from a specific column in a file

Hello, A basic query. How can I remove a string from a specific column. For example, remove "abcd" just from column 2 in example file: abcd abcd1 abcd abcd2 abcd abcd3 to get output: abcd 1 abcd 2 abcd 3 Thank you!:) (4 Replies)
Discussion started by: auburn
4 Replies

2. Shell Programming and Scripting

Remove lines based on column value

Hi All, I just need a quick fix here. I need to delete all lines containing "." in the 6th column. Input: 1 1055498 . G T 5.46 . 1 1902377 . C T 7.80 . 1 1031540 . A G 34.01 PASS 1 ... (2 Replies)
Discussion started by: Hkins552
2 Replies

3. Shell Programming and Scripting

Remove lines that match string at end of column

I have this: 301205 0000030000041.49000000.00 2011111815505 908 301205 0000020000029.10000000.00 2011111815505 962 301205 0000010000027.56000000.00 2011111815505 3083 312291 ... (2 Replies)
Discussion started by: herot
2 Replies

4. UNIX for Dummies Questions & Answers

[SOLVED] remove lines that have duplicate values in column two

Hi, I've got a file that I'd like to uniquely sort based on column 2 (values in column 2 begin with "comp"). I tried sort -t -nuk2,3 file.txtBut got: sort: multi-character tab `-nuk2,3' "man sort" did not help me out Any pointers? Input: Output: (5 Replies)
Discussion started by: pathunkathunk
5 Replies

5. UNIX for Dummies Questions & Answers

Remove lines contain certain string

i have file input aa,20120626 bb,45Cexpect to remove all lines when $2 doesn't end with 'C" output bb,45Ci tried this sed -i -nl -e '/\<C\>/ {p;} ' file1 but the result : sed illegal option -i (5 Replies)
Discussion started by: radius
5 Replies

6. UNIX for Dummies Questions & Answers

Remove lines in a positional file based on string value

Gurus, I am relatively new to Unix scripting and am struck with a problem in my script. I have positional input file which has a FLAG indicator in at position 11 in every record of the file. If the Flag has value =Y, then the record from the input needs to be written to a new file.However if... (3 Replies)
Discussion started by: gsam
3 Replies

7. Shell Programming and Scripting

Remove multiple lines from a particular string to particular string

Hi, I have a file containing the DDLs of tables in a schema. From that I need to remove all the lines from a starting string till a specific string. Here is an example. File1.txt ------------- CREATE TABLE "SCHEMA1"."LKP11_TBL_USERS" ( "ID" NUMBER(8,0) NOT NULL ENABLE, "USER_ID"... (3 Replies)
Discussion started by: satyaatcgi
3 Replies

8. Shell Programming and Scripting

Remove lines matching a substring in a specific column

Dear group, I have following input text file: Brit 2016 11 18 12 00 10 1.485,00 EUR Brit 2016 11 18 12 00 10 142,64 EUR Brit 2016 11 18 12 00 10 19,80 EUR Brit 2016 11 18 12 00 10 545,00 EUR Brit 2016 11 18 12 00 10 6.450,00 EUR... (3 Replies)
Discussion started by: gfhsd
3 Replies

9. Shell Programming and Scripting

Remove duplicate consecutive lines with specific string

Hello, I'm trying to remove the duplicate consecutive lines with specific string "WARNING". File.txt abc; WARNING 2345 WARNING 2345 WARNING 2345 WARNING 2345 WARNING 2345 bcd; abc; 123 123 123 WARNING 1234 WARNING 2345 WARNING 2345 efgh; (6 Replies)
Discussion started by: Mannu2525
6 Replies

10. UNIX for Beginners Questions & Answers

Remove newline character from column spread over multiple lines in a file

Hi, I came across one issue recently where output from one of the columns of the table from where i am creating input file has newline characters hence, record in the file is spread over multiple lines. Fields in the file are separated by pipe (|) delimiter. As header will never have newline... (4 Replies)
Discussion started by: Prathmesh
4 Replies
RP(4)							   BSD Kernel Interfaces Manual 						     RP(4)

NAME
rp -- driver for Comtrol RocketPort Intelligent Serial Port Cards SYNOPSIS
device rp For ISA cards, you must specify the port address in /boot/device.hints: hint.rp.0.at="isa" hint.rp.0.port="0x100" DESCRIPTION
This driver provides a kernel device driver for the RocketPort and RocketPort RA serial boards. These boards provide 8, 16, or 32 high-speed serial ports while requiring only 68 bytes of I/O space for all 8, 16, or 32 ports, and do not require an interrupt channel. This driver supports up to four RocketPort or RocketPort RA boards in one machine simultaneously. If you are using four 32 port RocketPort boards, you can put as many as 128 intelligent serial ports on your system. The rp driver supports the following speeds: 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600, 19200, 38400, 7200, 14400, 57600, 76800, 115200, and 230400. (You must use termios(4), rather than the old style ioctl interface to use non-traditional speeds.) An open on the rp driver will block until carrier is present, unless O_NONBLOCK or CLOCAL is set. HARDWARE CONFIGURATION
The first RocketPort or RocketPort RA card requires a 68-byte contiguous block of I/O addresses, starting at one of the following: 0x100h, 0x140h, 0x180h, 0x200h, 0x240h, 0x280h, 0x300h, 0x340h, 0x380h. The second, third, and fourth RocketPort cards require only a 64-byte con- tiguous block of I/O addresses, starting at one of the above address ranges. The I/O address range used by any of the RocketPort cards must not conflict with any other cards in the system, including other RocketPort cards. The starting range of the I/O ports used by each card must match with the I/O address specified in /boot/device.hints. Since the first RocketPort uses 68 I/O addresses, if the first card is set to use an I/O block starting at 0x100, it will occupy the I/O ports between 0x100 and 0x143. This means that the second, third, or fourth RocketPort board may not use the block of addresses starting at 0x140, since the first three I/O addresses of that range are used by the first board. This is an important point to keep in mind. If you have two ISA cards, one installed at 0x100 and the second installed at 0x180, then you should add the following to /boot/device.hints: hint.rp.0.at="isa" hint.rp.0.port="0x100" hint.rp.1.at="isa" hint.rp.1.port="0x180" The configuration of the RocketPort cards is done via the set of 8 DIP switches, labeled SW1 on the RocketPort card: +-------------------------------+ | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | +-------+-------+---------------+ | Unused| Card | I/O Port Block| +-------------------------------+ DIP switches 7 and 8 are unused, and must be left on. DIP switches 6 and 5 identify the card number of each RocketPort card. The first card installed in the system must have its DIP switches set as card number one; the second card installed in the system must have its DIP switches set as card number two; and so on. As shipped from the factory, DIP switches 6 and 5 are both on by default, indicating that this is the first card installed on the system: DIP Switches 6 5 =================== On On First Card On Off Second Card Off On Third Card Off Off Fourth Card DIP switches 4, 3, 2, and 1 indicate the I/O address range used by the first RocketPort card. If there are more than one RocketPort cards installed in a system, the second, third and fourth RocketPort cards must also be set to the I/O address range used by the first RocketPort card; all cards must have these DIP switches set identically for proper operation. As shipped from the factory, DIP switch 4 is on, and switches 3, 2, and 1 are off by default, indicating an I/O address range used by the first card which starts at 0x180 and extends to 0x1C3. DIP Switches I/O Address Range 4 3 2 1 Used by the First Card ===================================== On Off On Off 100-143 On Off Off On 140-183 On Off Off Off 180-1C3 Off On On Off 200-243 Off On Off On 240-283 Off On Off Off 280-2C3 Off Off On Off 300-343 Off Off Off On 340-383 Off Off Off Off 380-3C3 FILES
/dev/ttyR[0-4][0-9a-f] AUTHORS
Theodore Ts'o <tytso@mit.edu> This driver was written under contract for Comtrol Corporation. For dealer, distributor and other information regarding Comtrol RocketPort, contact Comtrol Corporation at (800) 926-6876 or send email to <info@comtrol.com>. To report bugs for this driver, please send email to <bug-bsdi-rocketport@comtrol.com>. BUGS
If incoming software flow control is enabled on a 486 or Pentium machine, and the flow control is very heavily exercised, on rare occasions a character will get dropped. This problem does not occur on a 386, and it is not currently known whether the bug is in the rp driver or in the BSD/OS tty layer. BSD
November 15, 1995 BSD
All times are GMT -4. The time now is 12:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy