Sponsored Content
Top Forums Shell Programming and Scripting changing a variable length text to a fixed length Post 302441849 by dc18 on Monday 2nd of August 2010 03:27:03 PM
Old 08-02-2010
Question

Hi Scott,
You mention 'change the 10th column' , I need to change the 10th field in the .csv file (the actual start column of field 10 will vary) .... does your solution still apply ?
Dave
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

creating a fixed length output from a variable length input

Is there a command that sets a variable length? I have a input of a variable length field but my output for that field needs to be set to 32 char. Is there such a command? I am on a sun box running ksh Thanks (2 Replies)
Discussion started by: r1500
2 Replies

2. Shell Programming and Scripting

convert XML file into Text file(fixed length)

If someone out there could help me out with this problem. I would really appreciate it. I am trying to convert xml into text file(fixed length) using Unix Borne shell scripts. My xml file: <root> <header_rec recordtype="00"> <record_id>00</record_id> ... (0 Replies)
Discussion started by: ram2s2001
0 Replies

3. Shell Programming and Scripting

Combining Two fixed width columns to a variable length file

Hi, I have two files. File1: File1 contains two fixed width columns ID of 15 characters length and Name is of 100 characters length. ID Name 1-43<<11 spaces>>Swapna<<94 spaces>> 1-234<<10 spaces>>Mani<<96 spaces>> 1-3456<<9 spaces>>Kapil<<95 spaces>> File2: ... (4 Replies)
Discussion started by: manneni prakash
4 Replies

4. Shell Programming and Scripting

Comparing column of variable length anf fixed width file

Hi, I have two input files. File1: ID Name Place 1-234~name1~Newyork 1-34~name2~Boston 1-2345~name3~Hungary File1 is a variable length file where each column is seperated by delimitter "~". File2: ID Country 1-34<<11 SPACES>>USA<<7 spaces>> 1-234<<10 SPACES>>UK<<8... (5 Replies)
Discussion started by: manneni prakash
5 Replies

5. UNIX for Dummies Questions & Answers

What the command to find out the record length of a fixed length file?

I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies

6. UNIX for Dummies Questions & Answers

Convert a tab delimited/variable length file to fixed length file

Hi, all. I need to convert a file tab delimited/variable length file in AIX to a fixed lenght file delimited by spaces. This is the input file: 10200002<tab>US$ COM<tab>16/12/2008<tab>2,3775<tab>2,3783 19300978<tab>EURO<tab>16/12/2008<tab>3,28523<tab>3,28657 And this is the expected... (2 Replies)
Discussion started by: Everton_Silveir
2 Replies

7. Shell Programming and Scripting

Make variable length record a fixed length

Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types: (H)eader Records (D)etail Records (T)railer Records The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Discussion started by: jclanc8
3 Replies

8. Shell Programming and Scripting

fixed length text file padding issues in AIX

Hi, I have a fixed length text file that needs to be cut into individual files in aix and facing padding issues. If I have multiple blank spaces in the file it is just making it one while cutting the files.. Eg:- $ - blank space filename:file.txt ... (2 Replies)
Discussion started by: techmoris
2 Replies

9. Shell Programming and Scripting

Extracting fixed length number from a text file

Hi, I have a text file with sample records as CASE ID: 20170218881083 Original presentment record for ARN not found for Re-presentment I want to extract the 23 digit number from this file. I thought of using grep but initially couldn't extract the required number. However, after... (16 Replies)
Discussion started by: dsid
16 Replies

10. Shell Programming and Scripting

Convert variable length record to fixed length

Hi Team, I have an issue to split the file which is having special chracter(German Char) using awk command. I have a different length records in a file. I am separating the files based on the length using awk command. The command is working fine if the record is not having any... (7 Replies)
Discussion started by: Anthuvan
7 Replies
LED(4)							   BSD Kernel Interfaces Manual 						    LED(4)

NAME
led -- API for manipulating LED's, lamps and other annunciators SYNOPSIS
#include <dev/led/led.h> typedef void led_t(void *priv, int onoff); struct cdev * led_create_state(led_t *func, void *priv, char const *name, int state); struct cdev * led_create(led_t *func, void *priv, char const *name); void led_destroy(struct cdev *); DESCRIPTION
The led driver provides generic support for handling LEDs, lamps and other annunciators. The hardware driver must supply a function to turn the annunciator on and off and the device name of the annunciator relative to /dev/led/. The priv argument is passed back to this on/off function and can be used however the hardware driver sees fit. The lamp can be controlled by opening and writing ASCII strings to the /dev/led/bla device. In the following, we will use this special notation to indicate the resulting output of the annunciator: * The annunciator is on for 1/10th second. _ The annunciator is off for 1/10th second. State can be set directly, and since the change happens immediately, it is possible to flash the annunciator with very short periods and syn- chronize it with program events. It should be noted that there is a non-trivial overhead, so this may not be usable for benchmarking or mea- suring short intervals. 0 Turn the annunciator off immediately. 1 Turn the annunciator on immediately. Flashing can be set with a given period. The pattern continues endlessly. f _* f1 _* f2 __** f3 ___*** ... f9 _________********* Three high-level commands are available: d%d Numbers. Each digit is blinked out at 1/10th second, zero as ten pulses. Between digits a one second pause and after the last digit a two second pause after which the sequence is repeated. s%s String. This gives full control over the annunciator. Letters 'A' ... 'J' turn the annunciator on for from 1/10th to one full second. Letters 'a' ... 'j' turn the annunciator off for 1/10th to one full second. Letters 'u' and 'U' turn the annunciator off and on respectively when the next UTC second starts. Unless terminated with a '.', the sequence is immediately repeated. m%s Morse. '.' becomes '_*' '-' becomes '_***' ' ' becomes '__' ' ' becomes '____' The sequence is repeated after a one second pause. FILES
/dev/led/* EXAMPLES
A 'd12' flashes the lamp *__________*_*______________________________ A 'sAaAbBa' flashes *_*__**_ /usr/games/morse -l "Soekris rocks" > /dev/led/error SEE ALSO
morse(6) HISTORY
The led driver first appeared in FreeBSD 5.2. AUTHORS
This software was written by Poul-Henning Kamp <phk@FreeBSD.org>. This manual page was written by Sergey A. Osokin <osa@FreeBSD.org> and Poul-Henning Kamp <phk@FreeBSD.org>. BSD
April 24, 2007 BSD
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy