Sponsored Content
Full Discussion: Help with Fixed with data
Top Forums UNIX for Dummies Questions & Answers Help with Fixed with data Post 302606629 by Scrutinizer on Monday 12th of March 2012 09:41:57 AM
Old 03-12-2012
Doh... Smilie
Aks, in printf formatting %-1000s means left align the argument in a field that is 1000 characters wide (If the field is wider than the argument pad with spaces).
This User Gave Thanks to Scrutinizer For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Fixed Format File

Hi to All, Would you please help me. I have a issue like in fixed format file there are 80 words should be there. but if file contains greater than 80 words then creates problem. so i have to trim file having more than 80 characters line through unix shell scripting. Please let me know how... (2 Replies)
Discussion started by: div_Neev
2 Replies

2. Shell Programming and Scripting

Extract data based on match against one column data from a long list data

My input file: data_5 Ali 422 2.00E-45 102/253 140/253 24 data_3 Abu 202 60.00E-45 12/23 140/23 28 data_1 Ahmad 256 7.00E-45 120/235 140/235 22 data_4 Aman 365 8.00E-45 15/65 140/65 20 data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies

3. Shell Programming and Scripting

row to column and position data in to fixed column width

Dear friends, Below is my program and current output. I wish to have 3 or 4 column output in order to accomodate in single page. i do have subsequent command to process after user enter the number. Program COUNT=1 for MYDIR in `ls /` do VOBS=${MYDIR} echo "${COUNT}. ${MYDIR}" ... (4 Replies)
Discussion started by: baluchen
4 Replies

4. Shell Programming and Scripting

Script need to get fixed

I need immediate help with this code. I do want to through the output of query into the log file and then on behelf of result i do want to automate an email warning system. while compiling this code i failed to through the output into the log file. To avoid manual password change for... (3 Replies)
Discussion started by: asifrafiqe
3 Replies

5. Shell Programming and Scripting

Getting a string without fixed delimiters

I have a line of text for example aaaa bbbb cccc dddd eeee ffffff I would need to get the cccc however bbbb could be there or not. So whether bbbb is in the line or not I need cccc. I was looking at either awk or sed....and trying to start at c and end until the next space. Also... (11 Replies)
Discussion started by: bombcan1
11 Replies

6. Shell Programming and Scripting

Fixed length fields

HPUX and posix shell Hi all. I have a record with fixed length fields....I would like to reorder the fields and preserver the fixed lengths.... cat test 4 960025460 Dept of Music 8 960025248 Dept of Music 12-08 cat... (3 Replies)
Discussion started by: lyoncc
3 Replies

7. Shell Programming and Scripting

Ignore Header and Footer and Sort the data in fixed width file

Hi Experts, I want to Sort the data in fixed width file where i have Header and Footer also in file. I m using below commad to do the sort based on field satarting from 15 position to 17 position , but it is not ignoring the Header and Footer of the file while sorting. In the output i am... (5 Replies)
Discussion started by: sasikari
5 Replies

8. Post Here to Contact Site Administrators and Moderators

How to sum up data in fixed width file with decimal point?

HI Everyone, I have below source file AAA|NAME1|ADDRESS1|300.20 BBB|NAME2|ADDRESS2|400.31 CCC|NAME3|ADDRESS3|300.34 I have requirement where I need to sum up fourth field in above fixed width pipe delimited flat file. When I use below code, it gives me value 1001.00 But I am expecting... (1 Reply)
Discussion started by: patricjemmy6
1 Replies

9. 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
form_field_attributes(3CURSES)				     Curses Library Functions				    form_field_attributes(3CURSES)

NAME
form_field_attributes, set_field_fore, field_fore, set_field_back, field_back, set_field_pad, field_pad - format the general display attributes of forms SYNOPSIS
cc [ flag... ] file... -lform -lcurses [ library... ] #include <form.h> int set_field_fore(FIELD *field, chtype attr); chtype field_fore(FIELD *field); int set_field_back(FIELD *field, chtype attr); chtype field_back(FIELD *field); int set_field_pad(FIELD *field, int pad); int field_pad(FIELD *field); DESCRIPTION
set_field_fore() sets the foreground attribute of field. The foreground attribute is the low-level curses display attribute used to display the field contents. field_fore() returns the foreground attribute of field. set_field_back() sets the background attribute of field. The background attribute is the low-level curses display attribute used to display the extent of the field. field_back() returns the background attribute of field. set_field_pad() sets the pad character of field to pad. The pad character is the character used to fill within the field. field_pad() returns the pad character of field. RETURN VALUES
field_fore(), field_back(), and field_pad() return default values if field is NULL. If field is not NULL and is not a valid FIELD pointer, the return value from these routines is undefined. set_field_fore(), set_field_back(), and set_field_pad() return one of the following: E_OK The function returned successfully. E_SYSTEM_ERROR System error. E_BAD_ARGUMENT An argument is incorrect. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
curses(3CURSES), forms(3CURSES), attributes(5) NOTES
The header <form.h> automatically includes the headers <eti.h> and <curses.h>. SunOS 5.10 31 Dec 1996 form_field_attributes(3CURSES)
All times are GMT -4. The time now is 08:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy