Sponsored Content
Top Forums Shell Programming and Scripting Subsitute from a position till end of line. Post 302316684 by _Noprofi on Saturday 16th of May 2009 01:32:56 AM
Old 05-16-2009
Subsitute from a position till end of line.

Hi,
Having a following file's content, lets say:

ABC|ANA|LDJ|||||DKD||||||
AJJ|KKDD||KKDK||||||||||||
KKD||KD|||LLLD||||LLD|||||

Problem:

Need to replace pipes from 8th occurrence of pipe till end.

so the result should be:
ABC|ANA|LDJ|||||DKD
AJJ|KKDD||KKDK||||
-------
-------

Can someone give me one line sed or may one line perl script?

Thanks in advance !
Smilie

Last edited by _Noprofi; 05-16-2009 at 02:41 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

check position of end of line for some specific lines

-------------------------------------------------------------------------------- Have to check in a file that the lines starting with 620 and 705 are ending at same posiotin. 82012345 62023232323 70523949558 62023255454 9999 In the above lines, i have to check the lines starting... (1 Reply)
Discussion started by: senthil_is
1 Replies

2. Shell Programming and Scripting

check position of end of line(URGENT PLS)

I Have to check in a file that all the lines are ending at same posiotin. Ex : line 1 is ending at position 88 line 2 should at same position i.e 88 Thanks in advance (6 Replies)
Discussion started by: evvander
6 Replies

3. Shell Programming and Scripting

Urgent! Sed/Awk Filter Find Pattern Delete Till End Of Line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (2 Replies)
Discussion started by: rajan_san
2 Replies

4. UNIX for Advanced & Expert Users

Urgent Help required : awk/sed help to find pattern and delete till end of line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies

5. UNIX for Dummies Questions & Answers

find if a position is between a given start and end position

Hi, I am a newbie in unix programming so maybe this is a simple question. I would like to know how can I make a script that outputs only the values that are not between any given start and end positions Example file1: 2 30 40 80 82 100 file2: ID1 1 ID2 35 ID3 80 ID4 81 ID6... (9 Replies)
Discussion started by: fadista
9 Replies

6. Shell Programming and Scripting

take all characters from end to start till a fullstop

e.g. "hello.all" to be transformed to "all" :b: (6 Replies)
Discussion started by: hakermania
6 Replies

7. Shell Programming and Scripting

Grep from a starting line till the end of the file

Hi Folks, I got to know from this forums on how to grep from a particular line say line 6 awk 'NR==6 {print;exit}' But how do i grep from line 6 till the end of the file or command output. Thanks, (3 Replies)
Discussion started by: Mr. Zer0
3 Replies

8. Shell Programming and Scripting

Remove line starting from space till end.

Hi, I have a code tag, from which i have the below snippet: intelrpt.GetCMB_FB type=ODBC> intelrpt.GetCMB_FB type=SYBASE> I want the output like: intelrpt.GetCMB_FB intelrpt.GetCMB_FB That is remove the lines starting from WHITESPACE till end. Please help. I am new to... (7 Replies)
Discussion started by: anupdas
7 Replies

9. Shell Programming and Scripting

Remove the spaces at the end of a line starting from a fixed position

I want to remove the trailing spaces at the end of each line starting from a particular position(using ksh script). For example, in the attached file, I want to remove all the spaces starting from the position 430 till the end. The space has to be removed only from the 430th position no matter in... (3 Replies)
Discussion started by: Suryaaravindh
3 Replies

10. Shell Programming and Scripting

Cut line from file till the end

Hi I have a 57 line text file and I want to cut first 6 line assigned it to a veriable and again cut next 6 line assigned to same variable till the time file have left 0 line. Please let me know how I can do in scripting. Thanks Sanjay (6 Replies)
Discussion started by: Sanjay2121
6 Replies
SF(4)                                                      BSD Kernel Interfaces Manual                                                      SF(4)

NAME
sf -- Adaptec AIC-6915 "Starfire" PCI Fast Ethernet adapter driver SYNOPSIS
To compile this driver into the kernel, place the following lines in your kernel configuration file: device miibus device sf Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_sf_load="YES" DESCRIPTION
The sf driver provides support for Adaptec Duralink Fast Ethernet adapters based on the Adaptec AIC-6915 "Starfire" chipset. The AIC-6915 is a bus master controller with an MII interface. It supports high and low priority transmit and receive queues, TCP/IP check- sum offload, multiple DMA descriptor formats and both polling and producer/consumer DMA models. The AIC-6915 receive filtering options include a 16 entry perfect filter, a 512-bit hash table for multicast addresses, a 512-bit hash table for priority address matching and VLAN filtering. An external MII-compliant transceiver is required for media interfacing. Multiport adapters consist of several AIC-6915 controllers connected via a PCI to PCI bridge. Each controller is treated as a separate interface by the sf driver. The sf driver supports the following media types: autoselect Enable autoselection of the media type and options. The user can manually override the autoselected mode by adding media options to the /etc/rc.conf file. 10baseT/UTP Set 10Mbps operation. The mediaopt option can also be used to select either full-duplex or half-duplex modes. 100baseTX Set 100Mbps (Fast Ethernet) operation. The mediaopt option can also be used to select either full-duplex or half-duplex modes. The sf driver supports the following media options: full-duplex Force full duplex operation half-duplex Force half duplex operation. For more information on configuring this device, see ifconfig(8). HARDWARE
Adapters supported by the sf driver include: o ANA-62011 64-bit single port 10/100baseTX adapter o ANA-62022 64-bit dual port 10/100baseTX adapter o ANA-62044 64-bit quad port 10/100baseTX adapter o ANA-69011 32-bit single port 10/100baseTX adapter o ANA-62020 64-bit single port 100baseFX adapter SYSCTL VARIABLES
The following variables are available as both sysctl(8) variables and loader(8) tunables: dev.sf.%d.int_mod Maximum amount of time to delay interrupt processing in units of 102.4us. The accepted range is 0 to 31, the default value is 1 (102.4us). Value 0 completely disables the interrupt moderation. The interface does not need to be brought down and up again before a change takes effect. dev.sf.%d.stats Display lots of useful MAC counters maintained in the driver. DIAGNOSTICS
sf%d: couldn't map memory A fatal initialization error has occurred. This may happen if the PCI BIOS not configured the device, which may be because the BIOS has been configured for a "Plug and Play" operating system. The "Plug and Play OS" setting in the BIOS should be set to "no" or "off" in order for PCI devices to work properly with FreeBSD. sf%d: couldn't map ports A fatal initialization error has occurred. This may happen if the PCI BIOS not configured the device, which may be because the BIOS has been configured for a "Plug and Play" operating system. The "Plug and Play OS" setting in the BIOS should be set to "no" or "off" in order for PCI devices to work properly with FreeBSD. sf%d: couldn't map interrupt A fatal initialization error has occurred. sf%d: no memory for softc struct! The driver failed to allocate memory for per-device instance information during initialization. sf%d: failed to enable I/O ports/memory mapping! The driver failed to initialize PCI I/O port or shared memory access. This might happen if the card is not in a bus-master slot. sf%d: watchdog timeout The device has stopped responding to the network, or there is a problem with the network connection (cable). SEE ALSO
altq(4), arp(4), miibus(4), netintro(4), ng_ether(4), polling(4), vlan(4), ifconfig(8) The Adaptec AIC-6915 Programmer's Manual, http://download.adaptec.com/pdfs/user_guides/aic6915_pg.pdf. HISTORY
The sf device driver first appeared in FreeBSD 3.0. AUTHORS
The sf driver was written by Bill Paul <wpaul@ctr.columbia.edu>. BSD January 21, 2008 BSD
All times are GMT -4. The time now is 08:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy