Sponsored Content
Top Forums Shell Programming and Scripting How to Split File to 2 depending on condition? Post 302857245 by OTNA on Wednesday 25th of September 2013 05:10:33 PM
Old 09-25-2013
Thanks "MAN" again
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk script to split a file based on the condition

I have the file with the records like 4234234 US phone 3244234 US cup 2342342 CA phone 8947234 US phone 2389472 CA cup 2348972 US maps 3894234 CA phone I want the records with (US,phone) as record to be in one file, (Us, cup) in another file and (CA,cup) to be in another I mean all... (12 Replies)
Discussion started by: superprogrammer
12 Replies

2. Shell Programming and Scripting

split file depending on content

Hi, I have a file which contains records of data. I need to split the file into multiple files depending upon the value of last field. How do i read the last field of each record in the file??? Regards, Chaitrali (4 Replies)
Discussion started by: Chaitrali
4 Replies

3. Shell Programming and Scripting

How to split the String based on condition?

hi , I have a String str="/opt/ibm/lotus/ibw/latest" or ="/opt/lotus/ibw/latest" this value is dynamic..I want to split this string into 2 strings 1. /opt/ibm/lotus(/opt/lotus) this string must ends with "lotus" 2./ibw/latest can any body help me on this? Regards, sankar (2 Replies)
Discussion started by: sankar reddy
2 Replies

4. Shell Programming and Scripting

Split file into multiple files depending upon first 4 digits

Hi All, I have a file like below: 1016D"ddd","343","1299" 1016D"ddd","3564","1299" 1016D"ddd","3297","1393" 1016D"ddd","32989","1527" 1016D"ddd","346498","1652" 2312D"ddd","3269","1652" 2312D"ddd","328","1652" 2312D"ddd","2224","2100" 3444D"ddd","252","2100" 3444D"ddd","2619","2100"... (4 Replies)
Discussion started by: deepakgang
4 Replies

5. Shell Programming and Scripting

split file with condition

$ cat file H1:12:90 k:12:b n:22:i k:54:b k:42:b s:48:s a:41:b t:18:n c:77:a I am trying to split above file based on $2 such that if $2 is rounded to nearest 10's multiple (e.g. 10,20,30 etc), each sub file should contain 3 multiples and so on (also I want to keep header i.e. NR==1, in... (6 Replies)
Discussion started by: uwork72
6 Replies

6. Shell Programming and Scripting

How to reject row from one file to another depending upon some condition

Hi I have a input file say abc.dat which contains data as below name~address~email~ID john~newyork~john@gmail.com~1500D steve~sydney~steve@abc.com~3451E Now if length of name is > 50 or ID is null then the row should rejected to another file say reject.dat along with reason for rejection... (2 Replies)
Discussion started by: saurav2602
2 Replies

7. Shell Programming and Scripting

How to split a data file into separate files with the file names depending upon a column's value?

Hi, I have a data file xyz.dat similar to the one given below, 2345|98|809||x|969|0 2345|98|809||y|0|537 2345|97|809||x|544|0 2345|97|809||y|0|651 9685|98|809||x|321|0 9685|98|809||y|0|357 9685|98|709||x|687|0 9685|98|709||y|0|234 2315|98|809||x|564|0 2315|98|809||y|0|537... (2 Replies)
Discussion started by: nithins007
2 Replies

8. Shell Programming and Scripting

Split file depending on Column Value

Hi , my file look likes below , cat file.csv 12/09/2014,50,5,0,300 12/09/2014, ,5,0,300 12/09/2014,50,,,300 i need to split file , the first one contains values (2nd column is 50 , 3rd and fourth column is null ) the second file contains all others firstfile ... (2 Replies)
Discussion started by: ubaisalih
2 Replies

9. Shell Programming and Scripting

Split a non delimited file into columns depending on user input

I would like some advice on some code. I want to write a small script that will take an input file of this format 111222233334444555666661112222AAAA 2222333445556612323244455445454545 2334556345643534505435345353453453 (and so on) It will be called as : script inputfile X (where X is... (5 Replies)
Discussion started by: onlyforbopi
5 Replies

10. UNIX for Advanced & Expert Users

How to split a large file with the first 100 lines of each condition?

I have a huge file with the following input: Case1 Specific_Info Specific_Info Case1 Specific_Info Specific_Info Case3 Specific_Info Specific_Info Case4 Specific_Info Specific_Info Case1 Specific_Info Specific_Info Case2 Specific_Info Specific_Info Case2 Specific_Info Specific_Info... (2 Replies)
Discussion started by: laurigo
2 Replies
LE(4)							   BSD Kernel Interfaces Manual 						     LE(4)

NAME
le -- AMD 7990, 79C90, 79C960, 79C970 LANCE Ethernet interface driver SYNOPSIS
ISA boards nele0 at isa? port 0x320 irq 9 drq 7 # NE2100 le* at nele? bicc0 at isa? port 0x320 irq 10 drq 7 # BICC Isolan le* at bicc? depca0 at isa? port 0x300 iomem 0xc8000 iosiz 0x8000 irq 5 # DEC DEPCA le* at depca? le* at isapnp? # ISA Plug-and-Play adapters EISA boards depca* at eisa? slot ? # DEC DE422 le* at depca? MCA boards le* at mca? slot ? # SKNET Personal/MC2+ PCI boards and mainboard adapters le* at pci? dev? function ? TURBOchannel PMAD-A or onboard (alpha, pmax) le* at tc? slot ? offset ? alpha le* at ioasic? offset ? amiga le* at zbus0 atari le0 at vme0 irq 4 # BVME410 le0 at vme0 irq 5 # Riebl/PAM hp300 le* at dio? scode ? mvme68k le0 at pcc? ipl 3 # MVME147 news68k le0 at hb0 addr 0xe0f00000 ipl 4 newsmips le0 at hb0 addr 0xbff80000 level 1 pmax le* at ioasic? offset ? le* at ibus0 addr ? sparc and sparc64 le* at sbus? slot ? offset ? le* at ledma0 slot ? offset ? le* at lebuffer? slot ? offset ? sun3 le0 at obio0 addr 0x120000 ipl 3 options LANCE_REVC_BUG vax le0 at vsbus0 csr 0x200e0000 DESCRIPTION
The le interface provides access to a Ethernet network via the AMD Am7990 and Am79C90 (CMOS, pin-compatible) LANCE (Local Area Network Con- troller - Ethernet) chip set. The le driver also supports PCnet-PCI cards based on the AMD 79c970 chipset, which is a single-chip implementation of a LANCE chip and PCI bus interface. Each of the host's network addresses is specified at boot time with an SIOCSIFADDR ioctl(2). The le interface employs the Address Resolution Protocol (ARP) described in arp(4) to dynamically map between Internet and Ethernet addresses on the local network. Selective reception of multicast Ethernet frames is provided by a 64-bit mask; multicast destination addresses are hashed to a bit entry using the Ethernet CRC function. The use of "trailer" encapsulation to minimize copying data on input and output is supported by the interface but offers no advantage on sys- tems with large page sizes. The use of trailers is automatically negotiated with ARP. This negotiation may be disabled, on a per-interface basis, with ifconfig(8). HARDWARE
amiga The le interface supports the following Zorro II expansion cards: A2065 Commodore's Ethernet card, manufacturer 514, product 112 AMERISTAR Ameristar's Ethernet card, manufacturer 1053, product 1 ARIADNE Village Tronic's Ethernet card, manufacturer 2167, product 201 The A2065 and Ameristar Ethernet cards support only manual media selection. The Ariadne card supports a software media selection for its two different connectors: 10Base2/BNC also known as thinwire-Ethernet 10BaseT/UTP also known as twisted pair The Ariadne card uses an autoselect between UTP and BNC, so it uses UTP when an active UTP line is connected or otherwise BNC. See ifmedia(4) for media selection options for ifconfig(8). ISA The ISA-bus Ethernet cards supported by the le interface are: BICC Isolan Novell NE2100 Digital DEPCA EISA The EISA-bus Ethernet cards supported by the le interface are: DEC DE422 MCA The MCA-bus Ethernet cards supported by the le interface are: SKNET Personal MC2 SKNET MC2+ pmax All LANCE interfaces on DECstations are supported, as are interfaces on Alpha AXP machines with a TURBOchannel bus. No support is provided for switching between media ports. The DECstation 3100 provides both AUI and BNC (thinwire or 10BASE2) connectors. Port selection is via a manual switch and is not software configurable. The DECstation model 5000/200 PMAD-AA baseboard device provides only a BNC connector. The ioasic baseboard devices and the PMAD-AA TURBOchannel option card provide only an AUI port. sparc The Sbus Ethernet cards supported by the le interface include: SBE/S SCSI and Buffered Ethernet (sun part 501-1860) FSBE/S Fast SCSI and Buffered Ethernet (sun part 501-2015) Antares SBus 10Base-T Ethernet Buffered Ethernet (antares part 20-050-1007) Interfaces attached to an ledma0 on SPARC systems typically have two types of connectors: AUI/DIX Standard 15 pin connector 10BaseT UTP, also known as twisted pair The appropriate connector can be selected by supplying a media parameter to ifconfig(8). The supported arguments for media are: 10base5/AUI to select the AUI connector, or 10baseT/UTP to select the UTP connector. If a media parameter is not specified, a default connector is selected for use by examining all media types for carrier. The first connector on which a carrier is detected will be selected. Additionally, if carrier is dropped on a port, the driver will switch between the possible ports until one with carrier is found. DIAGNOSTICS
le%d: overflow More packets came in from the Ethernet than there was space in the receive buffers. Packets were missed. le%d: receive buffer error Ran out of buffer space, packet dropped. le%d: lost carrier The Ethernet carrier disappeared during an attempt to transmit. It will finish transmitting the current packet, but will not automatically retry transmission if there is a collision. le%d: excessive collisions, tdr %d Ethernet extremely busy or jammed, outbound packets dropped after 16 attempts to retransmit. TDR is "Time Domain Reflectometry". The LANCE TDR value is an internal counter of the interval between the start of a transmission and the occurrence of a collision. This value can be used to determine the distance from the Ethernet tap to the point on the Ethernet cable that is shorted or open (unterminated). le%d: dropping chained buffer Packet didn't fit into a single receive buffer, packet dropped. Since the le driver allocates buffers large enough to receive the maximum size Ethernet packet, this means some other station on the LAN transmitted a packet larger than allowed by the Ethernet standard. le%d: transmit buffer error LANCE ran out of buffer before finishing the transmission of a packet. If this error occurs, the driver soft- ware has a bug. le%d: underflow LANCE ran out of buffer before finishing the transmission of a packet. If this error occurs, the driver software has a bug. le%d: controller failed to initialize Driver failed to start the AM7990 LANCE. This is potentially a hardware failure. le%d: memory error RAM failed to respond within the timeout when the LANCE wanted to read or write it. This is potentially a hardware fail- ure. le%d: receiver disabled The LANCE receiver was turned off due to an error. le%d: transmitter disabled The LANCE transmitter was turned off due to an error. SEE ALSO
arp(4), ifmedia(4), inet(4), intro(4), mca(4), ifconfig(8) Am79C90 - CMOS Local Area Network Controller for Ethernet, 17881, May 1994, Advanced Micro Devices. HISTORY
The pmax le driver is derived from a le driver that first appeared in 4.4BSD. Support for multiple bus attachments first appeared in NetBSD 1.2. The Amiga le interface first appeared in NetBSD 1.0 The Ariadne Ethernet card first appeared with the Amiga ae interface in NetBSD 1.1 and was converted to the Amiga le interface in NetBSD 1.3 BUGS
The Am7990 Revision C chips have a bug which causes garbage to be inserted in front of the received packet occasionally. The work-around is to ignore packets with an invalid destination address (garbage will usually not match), by double-checking the destination address of every packet in the driver. This work-around is enabled with the LANCE_REVC_BUG kernel option. When LANCE_REVC_BUG is enabled, the le driver executes one or two calls to an inline Ethernet address comparison function for every received packet. On the mc68000 it is exactly eight instructions of 16 bits each. There is one comparison for each unicast packet, and two compar- isons for each broadcast packet. In summary, the cost of the LANCE_REVC_BUG option is: 1. loss of multicast support, and 2. eight extra CPU instructions per received packet, sometimes sixteen, depending on both the processor, and the type of packet. All sun3 systems are presumed to have this bad revision of the Am7990, until proven otherwise. Alas, the only way to prove what revision of the chip is in a particular system is inspection of the date code on the chip package, to compare against a list of what chip revisions were fabricated between which dates. Alas, the Am7990 chip is so old that AMD has "de-archived" the production information about it; pending a search elsewhere, we don't know how to identify the revision C chip from the date codes. On all pmax front-ends, performance is impaired by hardware which forces a software copy of packets to and from DMA buffers. The ioasic machines and the DECstation 3100 must copy packets to and from non-contiguous DMA buffers. The DECstation 5000/200 and the PMAD-AA must copy to and from an onboard SRAM DMA buffer. The CPU overhead is noticeable, but all machines can sustain full 10 Mb/s media speed. BSD
April 27, 2001 BSD
All times are GMT -4. The time now is 10:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy