Sponsored Content
Top Forums Shell Programming and Scripting Breaking up of a fixe width line in unix Post 302268372 by joeyg on Monday 15th of December 2008 01:19:34 PM
Old 12-15-2008
Hammer & Screwdriver So, something like the following?

Code:
> cat file114
CICS           4                                                         7050                                                         1010     9D103670833                                         1010     9D7006406542
CICS           5                                                         7050                                                         1010     9D103670833                                         1010     9D7006406542
> awk '{print substr($0,1,134)"\n"substr($0,135,61)"\n"substr($0,196,61)}' file114
CICS           4                                                         7050                                                         
1010     9D103670833                                         
1010     9D7006406542
CICS           5                                                         7050                                                         
1010     9D103670833                                         
1010     9D7006406542

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Command Line width parameter

can someone please tell me how i can increase the number of characters that can be input on the command line? (2 Replies)
Discussion started by: Scoogie
2 Replies

2. Shell Programming and Scripting

Breaking line

My input file is like USER_WORK.ABC USER_WORK.DEF I want output file like ABC DEF (4 Replies)
Discussion started by: scorp_rahul23
4 Replies

3. UNIX for Dummies Questions & Answers

printing configuration, line width

Hello, I have to configure printing format under aix 5.3, but don t manage to change size of lines. Thanks if you can help me : --- Printer description : I have a printer "pcltest" using HPJetDirect : hplj-4+ (PCL) I have a queue "qtest" defined on printer hp@pcltest --- Queue... (2 Replies)
Discussion started by: astjen
2 Replies

4. Shell Programming and Scripting

Appending string (charachters inside the line) to a fixed width file using awk or sed

Source File: abcdefghijklmnop01qrstuvwxyz abcdefghijklmnop02qrstuvwxyz abcdefghijklmnop03qrstuvwxyz abcdefghijklmnop04qrstuvwxyz abcdefghijklmnop05qrstuvwxyz Whatever characters are in 17-18 on each line of the file, it should be concatenated to the same line at the character number... (6 Replies)
Discussion started by: tamahomekarasu
6 Replies

5. Shell Programming and Scripting

'for LINE in $(cat file)' breaking at spaces, not just newlines

Hello. I'm making a (hopefully) simple shell script xml parser that outputs a file I can grep for information. I am writing it because I have yet to find a command line utility that can do this. If you know of one, please just stop now and tell me about it. Even better would be one I can input... (10 Replies)
Discussion started by: natedawg1013
10 Replies

6. Shell Programming and Scripting

Remove new line character and add space to convert into fixed width file

I have a file with different record length. The file as to be converted into fixed length by appending spaces at the end of record. The length should be calculated based on the record with maximum length in the file. If the length is less than the max length, the spaces should be appended... (4 Replies)
Discussion started by: Amrutha24
4 Replies

7. UNIX for Advanced & Expert Users

How to find a string in a line in UNIX file and delete that line and previous 3 lines ?

Hi , i have a file with data as below.This is same file. But actual file contains to many rows. i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ? Field 004... (7 Replies)
Discussion started by: vadlamudy
7 Replies

8. Shell Programming and Scripting

UNIX command -Filter rows in fixed width file based on column values

Hi All, I am trying to select the rows in a fixed width file based on values in the columns. I want to select only the rows if column position 3-4 has the value AB I am using cut command to get the column values. Is it possible to check if cut -c3-4 = AB is true then select only that... (2 Replies)
Discussion started by: ashok.k
2 Replies

9. Red Hat

How to know full width blade or half width blade?

HI, How do we figure out if the server is half blade server or full blade server? Anything we need to look at to know on this? thanks in advance (9 Replies)
Discussion started by: snchaudhari2
9 Replies

10. Shell Programming and Scripting

awk issue splitting a fixed-width file containing line feed in data

Hi Forum. I have the following script that splits a large fixed-width file into smaller multiple fixed-width files based on input segment type. The main command in the script is: awk -v search_col_pos=$search_col_pos -v search_str_len=$search_str_len -v segment_type="$segment_type"... (8 Replies)
Discussion started by: pchang
8 Replies
IL(4)							     Kernel Interfaces Manual							     IL(4)

NAME
il - Interlan NI1010 10 Mb/s Ethernet interface SYNOPSIS
/sys/conf/SYSTEM: NIL il_controllers # Interlan Ethernet DESCRIPTION
The il interface provides access to a 10 Mb/s Ethernet network through an Interlan 1010 or 1010A controller. Each of the host's network addresses is specified at boot time with an SIOCSIFADDR ioctl. The il interface employs the address resolution protocol described in arp(4P) to dynamically map between Internet and Ethernet addresses on the local network. The interface normally tries to use a ``trailer'' encapsulation to minimize copying data on input and output. The use of trailers is nego- tiated with ARP. This negotiation may be disabled, on a per-interface basis, by setting the IFF_NOTRAILERS flag with an SIOCSIFFLAGS ioctl. DIAGNOSTICS
il%d: input error. The hardware indicated an error in reading a packet off the cable or an illegally sized packet. il%d: can't handle af%d. The interface was handed a message with addresses formatted in an unsuitable address family; the packet was dropped. il%d: setaddr didn't work. The interface was unable to reprogram its physical ethernet address. This may happen with very early models of the interface. This facility is used only when the controller is not the first network interface configured for XNS. The oldest interface tested (2.7.1.0.1.45) has never failed in this way. The following messages indicate a probable hardware error performing the indicated operation during autoconfiguration or initialization. The status field in the control and status register (the low-order four bits) should indicate the nature of the failure. See the hardware manual for details. il%d: reset failed, csr=%b. il%d: status failed, csr=%b. il%d: hardware diag failed, csr=%b. il%d: verifying setaddr, csr=%b. il%d: stray xmit interrupt, csr=%b. il%d: can't initialize. SEE ALSO
intro(4N), inet(4F), arp(4P) 3rd Berkeley Distribution August 20, 1987 IL(4)
All times are GMT -4. The time now is 10:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy