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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
ppd_emit_to_file
ppd_emit_to_file(3) Library Functions Manual ppd_emit_to_file(3)NAME
ppd_emit_to_file, ppd_emit_to_fd - Output device specific code.
SYNOPSIS
#include <ppd/ppd.h>
gboolean ppd_emit( PpdFile * ppd,FILE *fp,PpdSectionOrder section );
gboolean ppd_emitfd( PpdFile * ppd, int fd,PpdSectionOrder section );
DESCRIPTION
The ppd_emit_* functions output the device specific code appropriate to the specified section that has not already been emitted.. The
PpdFile pointer is obtained from opening a PPD file via the ppd_load(3) family of functions. The section can be any one of the following:
PPD_ORDER_ANY
Option code can be anywhere in the file
PPD_ORDER_DOCUMENT
Option code must be in the DocumentSetup section
PPD_ORDER_EXIT
Option code must be sent prior to the document
PPD_ORDER_JCL
Option code must be sent as a JCL command
PPD_ORDER_PAGE
Option code must be in the PageSetup section
PPD_ORDER_PROLOG
Option code must be in the Prolog section
The sections PPD_ORDER_DOCUMENT and PPD_ORDER_PAGE will also output code from the PPD_ORDER_ANY section.
Once a code section has been emitted it is marked as such and will not be emitted unless it is re-marked.
EXAMPLE
/* Setup code to emitted */
ppd_mark_defaults(ppd);
ppd_mark_option(ppd,"Duplex","DuplexNoTumble");
ppd_mark_option(ppd,"PageSize","A4");
/* Emit initial code (including any reset and JCL code) */
ppd_emit_to_file(ppd,stdout,PPD_ORDER_EXIT);
fputs(ppd->jcl_begin->str,stdout);
ppd_emit_to_file(ppd, stdout, PPD_ORDER_JCL);
fputs(ppd->jcl_ps->str, stdout);
/* Any header comments go here */
...
/* Prolog section */
printf("%%%%BeginProlog0);
ppd_emit_to_file(ppd, stdout, PPD_ORDER_PROLOG);
printf("%%%%EndProlog0);
/* Setup section */
printf("%%%%BeginSetup0);
ppd_emit_to_file(ppd, stdout, PPD_ORDER_DOCUMENT);
printf("%%%%EndSetup0);
/* Main document begins */
for (...) {
printf("%%%%Page: 1 10);
/* Re-mark so that this is emitted on each page */
ppd_mark_option(ppd,"PageSize","A4");
printf("%%%%PageSetup0);
ppd_emit_to_file(ppd, stdout, PPD_ORDER_PAGE);
printf("%%%%EndPageSetup0);
/* Page info goes here */
...
}
/* Send ending JCL code */
fputs(ppd->jcl_end->str,stdout);
SEE ALSO ppd_file_new(3), ppd_file_free(3)ppd_emit_to_file(3)