Sponsored Content
Full Discussion: column renumbering
Top Forums Shell Programming and Scripting column renumbering Post 302298026 by Franklin52 on Monday 16th of March 2009 12:23:07 PM
Old 03-16-2009
Quote:
Originally Posted by adak
Hi,
I am a beginner in awk scripting! I need your help; I want to replace the fifth column number (which is 15 here) here in this file for example :

ATOM 142 N PRO A 15
ATOM 143 CD PRO A 15
ATOM 144 HD1 PRO A 15
ATOM 145 HD2 PRO A 15
ATOM 146 CA PRO A 15
ATOM 147 HA PRO A 15
ATOM 148 CB PRO A 15
ATOM 149 HB1 PRO A 15

with sequential numbering :

ATOM 142 N PRO A 1
ATOM 143 CD PRO A 2
ATOM 144 HD1 PRO A 3
ATOM 145 HD2 PRO A 4
ATOM 146 CA PRO A 5
ATOM 147 HA PRO A 6
ATOM 148 CB PRO A 7
ATOM 149 HB1 PRO A 8
with an awk shell script... I guess this is too simple a question!! but I would appreciate any suggestions from you...Smilie
thanks already.
Code:
 awk '{$NF=NR}{print}' file

Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

renumbering user id

Other than deleting and recreating a user can a users id number be changed? I need to have my user id the same on more than one system. (1 Reply)
Discussion started by: thumper
1 Replies

2. Shell Programming and Scripting

Renumbering files scripting help!

I am new to the world of UNIX scripting - and would like to make the following script: I have 100 files numbered 1-100. However - i would like to continue the file list - so that I add another 100 files following on, so that file 101 = 99; file 102 = 98 ; 103 = 97 and so on.... (basically ...... (6 Replies)
Discussion started by: AJC1985
6 Replies

3. Shell Programming and Scripting

Changing one column of delimited file column to fixed width column

Hi, Iam new to unix. I have one input file . Input file : ID1~Name1~Place1 ID2~Name2~Place2 ID3~Name3~Place3 I need output such that only first column should change to fixed width column of 15 characters of length. Output File: ID1<<12 spaces>>Name1~Place1 ID2<<12... (5 Replies)
Discussion started by: manneni prakash
5 Replies

4. Shell Programming and Scripting

Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2

Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2 file 1 sample SNDK 80004C101 AT XLNX 983919101 BB NETL 64118B100 BS AMD 007903107 CC KLAC 482480100 DC TER 880770102 KATS ATHR 04743P108 KATS... (7 Replies)
Discussion started by: rydz00
7 Replies

5. UNIX for Dummies Questions & Answers

renaming (renumbering) fasta files

I have a fasta file that looks like this: >Noname ACCAAAATAATTCATGATATACTCAGATCCATCTGAGGGTTTCACCACTTGTAGAGCTAT CAGAAGAATGTCAATCAACTGTCCGAGAAAAAAGAATCCCAGG >Noname ACTATAAACCCTATTTCTCTTTCTAAAAATTGAAATATTAAAGAAACTAGCACTAGCCTG ACCTTTAGCCAGACTTCTCACTCTTAATGCTGCGGACAAACAGA ... I want to... (2 Replies)
Discussion started by: Oyster
2 Replies

6. Shell Programming and Scripting

renumbering within a file

Hi All, I have 100 files named - rep-0.txt, rep-2.txt...rep-99.txt. They each contain information in the following format: abc 1 qwe asd 2 zxc poi 3 lkj pdh 4 ldf hgf 5 tyu i would like to re-number , so that all the new files (rep0.dat, rep1,dat....) have... (1 Reply)
Discussion started by: chen.xiao.po
1 Replies

7. Shell Programming and Scripting

Renumbering of COBOL Source code

Hi, I have written awk script to replicate RENUM function of ISPF. Please anyone has simple script than that. awk '{i=i+10;line=substr($0,7,73); printf("%06d%s\n", i, line) }' ABC.cob where ABC.cob is Cobol source code. (4 Replies)
Discussion started by: kailas.girase
4 Replies

8. Shell Programming and Scripting

Difference of the same column when two other column matches and one column differs less than 1 hour

This is my input file : # cat list 20130430121600, cucm, location,76,2 20130430121600,cucm1,location1,76,4 20130430122000,cucm,location,80,8 20130430122000,cucm1,location1,90,8 20130430140000,cucm1,location1,87,11 20130430140000, cucm,location,67,9 This is the required output ... (1 Reply)
Discussion started by: Lakshmikumari
1 Replies

9. Shell Programming and Scripting

Renumbering files bash script

I am new to the world of Linux scripting, and would like to make the following 2 scripts: I have 67 files named Alk-0001.txt to Alk-0067.txt I would like them to be numbered Alk-002.txt to Alk-0134.txt eg Alk-0001.txt > Alk-0002.txt Alk-0002.txt > Alk-0004.txt Alk-0003.txt > Alk-0006.txt ... (3 Replies)
Discussion started by: tollyboy_uk
3 Replies

10. Shell Programming and Scripting

Count Repetitive Number in a column and renumbering using awk

Unable to get the desired output. Need only the rows which has repeated values in column 5. Input File <tab separated file> chr1 3773797 3773797 CEP10 1 chr1 3773797 3773797 CEP104 2 chr1 3689350 3689350 SMIM1 2 chr1 3773797 3773797 CEP4 3 chr1 3773797 3773797 EP104 ... (7 Replies)
Discussion started by: himanshu
7 Replies
EM(4)							   BSD Kernel Interfaces Manual 						     EM(4)

NAME
em -- Intel(R) PRO/1000 Gigabit Ethernet adapter driver SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device em Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_em_load="YES" DESCRIPTION
The em driver provides support for PCI Gigabit Ethernet adapters based on the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, 82546EB, 82546GB, 82547, 82571, 81572, 82573, and 82574 Ethernet controller chips. The driver supports Transmit/Receive checksum off- load and Jumbo Frames on all but 82542-based adapters. Furthermore it supports TCP segmentation offload (TSO) on all adapters but those based on the 82543, 82544 and 82547 controller chips. The identification LEDs of the adapters supported by the em driver can be controlled via the led(4) API for localization purposes. For further hardware information, see the README included with the driver. For questions related to hardware requirements, refer to the documentation supplied with your Intel PRO/1000 adapter. All hardware require- ments listed apply to use with FreeBSD. Support for Jumbo Frames is provided via the interface MTU setting. Selecting an MTU larger than 1500 bytes with the ifconfig(8) utility configures the adapter to receive and transmit Jumbo Frames. The maximum MTU size for Jumbo Frames is 16114. This driver version supports VLANs. The em driver supports the following media types: autoselect Enables auto-negotiation for speed and duplex. 10baseT/UTP Sets 10Mbps operation. Use the mediaopt option to select full-duplex mode. 100baseTX Sets 100Mbps operation. Use the mediaopt option to select full-duplex mode. 1000baseSX Sets 1000Mbps operation. Only full-duplex mode is supported at this speed. 1000baseTX Sets 1000Mbps operation. Only full-duplex mode is supported at this speed. The em driver supports the following media options: full-duplex Forces full-duplex operation half-duplex Forces half-duplex operation. Only use mediaopt to set the driver to full-duplex. If mediaopt is not specified, the driver defaults to half-duplex. For more information on configuring this device, see ifconfig(8). HARDWARE
The em driver supports Gigabit Ethernet adapters based on the Intel 82540, 82541ER, 82541PI, 82542, 82543, 82544, 82545, 82546, 82546EB, 82546GB, 82547, 82571, 82572, 82573, and 82574 controller chips: o Intel PRO/1000 CT Network Connection (82547) o Intel PRO/1000 F Server Adapter (82543) o Intel PRO/1000 Gigabit Server Adapter (82542) o Intel PRO/1000 GT Desktop Adapter (82541PI) o Intel PRO/1000 MF Dual Port Server Adapter (82546) o Intel PRO/1000 MF Server Adapter (82545) o Intel PRO/1000 MF Server Adapter (LX) (82545) o Intel PRO/1000 MT Desktop Adapter (82540) o Intel PRO/1000 MT Desktop Adapter (82541) o Intel PRO/1000 MT Dual Port Server Adapter (82546) o Intel PRO/1000 MT Quad Port Server Adapter (82546EB) o Intel PRO/1000 MT Server Adapter (82545) o Intel PRO/1000 PF Dual Port Server Adapter (82571) o Intel PRO/1000 PF Quad Port Server Adapter (82571) o Intel PRO/1000 PF Server Adapter (82572) o Intel PRO/1000 PT Desktop Adapter (82572) o Intel PRO/1000 PT Dual Port Server Adapter (82571) o Intel PRO/1000 PT Quad Port Server Adapter (82571) o Intel PRO/1000 PT Server Adapter (82572) o Intel PRO/1000 T Desktop Adapter (82544) o Intel PRO/1000 T Server Adapter (82543) o Intel PRO/1000 XF Server Adapter (82544) o Intel PRO/1000 XT Server Adapter (82544) LOADER TUNABLES
Tunables can be set at the loader(8) prompt before booting the kernel or stored in loader.conf(5). hw.em.rxd Number of receive descriptors allocated by the driver. The default value is 256. The 82542 and 82543-based adapters can handle up to 256 descriptors, while others can have up to 4096. hw.em.txd Number of transmit descriptors allocated by the driver. The default value is 256. The 82542 and 82543-based adapters can handle up to 256 descriptors, while others can have up to 4096. hw.em.rx_int_delay This value delays the generation of receive interrupts in units of 1.024 microseconds. The default value is 0, since adapters may hang with this feature being enabled. hw.em.rx_abs_int_delay If hw.em.rx_int_delay is non-zero, this tunable limits the maximum delay in which a receive interrupt is generated. hw.em.tx_int_delay This value delays the generation of transmit interrupts in units of 1.024 microseconds. The default value is 64. hw.em.tx_abs_int_delay If hw.em.tx_int_delay is non-zero, this tunable limits the maximum delay in which a transmit interrupt is generated. DIAGNOSTICS
em%d: Unable to allocate bus resource: memory A fatal initialization error has occurred. em%d: Unable to allocate bus resource: interrupt A fatal initialization error has occurred. em%d: watchdog timeout -- resetting The device has stopped responding to the network, or there is a problem with the network connection (cable). SUPPORT
For general information and support, go to the Intel support website at: http://support.intel.com. If an issue is identified with the released source code on the supported kernel with a supported adapter, email the specific information related to the issue to <freebsdnic@mailbox.intel.com>. FILES
/dev/led/em* identification LED device nodes EXAMPLES
Make the identification LED of em0 blink: echo f2 > /dev/led/em0 Turn the identification LED of em0 off again: echo 0 > /dev/led/em0 SEE ALSO
altq(4), arp(4), igb(4), led(4), netintro(4), ng_ether(4), polling(4), vlan(4), ifconfig(8) HISTORY
The em device driver first appeared in FreeBSD 4.4. AUTHORS
The em driver was written by Intel Corporation <freebsdnic@mailbox.intel.com>. BUGS
Hardware-assisted VLAN processing is disabled by default. You can enable it on an em interface using ifconfig(8). BSD
May 14, 2010 BSD
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy