09-15-2007
continued
here i woulddd not like to truncate the data ... instead i would like to give a message that the particular field is not as expected (file validation)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi guys,
I have a text file like in following format,
IMSI:1
MSISDN:44569098
Data1=prov
Data2=yes
Data3=not
Data4=yes
Data5=yes
Data6=yes
IMSI:2
MSISDN:44569099
Data1=yes
Data2=not
Data3=prov
Data4=prov (3 Replies)
Discussion started by: maheshsri
3 Replies
2. UNIX for Advanced & Expert Users
:) Hi
i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error
Function i used it as
$ iconv -f UTF8 -t ANSI filename
Error iam getting is NOT Supported UTF8 to ANSI
please some help me out on this.........Let me... (1 Reply)
Discussion started by: rajreddy
1 Replies
3. UNIX for Dummies Questions & Answers
:confused: Hi
i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error
Function i used it as
$ iconv -f UTF8 -t ANSI filename
Error iam getting is NOT Supported UTF8 to ANSI
please some help me out on... (9 Replies)
Discussion started by: rajreddy
9 Replies
4. UNIX for Dummies Questions & Answers
Hi
I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source .
Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies
5. Shell Programming and Scripting
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies
6. Shell Programming and Scripting
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.
I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this?
Sample input
02/27/09,23:52:31
02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
Is there any way to convert a file which is in UNIX format to a PC format....
Flip command can be used , apart form this command can we have any other way.... like usinf "awk" etc ..... main purpose of not using flip is that my Kshell doesnot support this comamnd.... (1 Reply)
Discussion started by: Samtel
1 Replies
8. Shell Programming and Scripting
Hi All,
Is there any way to convert a file which is in UNIX format to a PC format....
Flip command can be used , apart form this command can we have any other way.... like usinf "awk" etc ..... main purpose of not using flip is that my Kshell doesnot support this comamnd.... (2 Replies)
Discussion started by: Samtel
2 Replies
9. Shell Programming and Scripting
Hi ,
i want to change this question, i will post soon.. (6 Replies)
Discussion started by: srikanth2567
6 Replies
10. Shell Programming and Scripting
Can anyone provide me a unix script to convert file formats. Input and desired output is attached. (10 Replies)
Discussion started by: Ravi S M
10 Replies
LEARN ABOUT REDHAT
set_fieldtype_arg
form_fieldtype(3X) form_fieldtype(3X)
NAME
form_fieldtype - define validation-field types
SYNOPSIS
#include <form.h>
FIELDTYPE *new_fieldtype(
bool (* const field_check)(FIELD *, const void *),
bool (* const char_check)(int, const void *));
int free_fieldtype(FIELDTYPE *fieldtype);
int set_fieldtype_arg(
FIELDTYPE *fieldtype,
void *(* const make_arg)(va_list *),
void *(* const copy_arg)(const void *),
void (* const free_arg)(void *));
int set_fieldtype_choice(
FIELDTYPE *fieldtype,
bool (* const next_choice)(FIELD *, const void *),
bool (* const prev_choice)(FIELD *, const void *));
FIELDTYPE *link_fieldtype(FIELDTYPE *type1,
FIELDTYPE *type2);
DESCRIPTION
The function new_fieldtype creates a new field type usable for data validation. You supply it with field_check, a predicate to check the
validity of an entered data string whenever the user attempt to leave a field. The (FIELD *) argument is passed in so the validation pred-
icate can see the field's buffer, sizes and other attributes; the second argument is an argument-block structure, about which more below.
You also supply new_fieldtype with char_check, a function to validate input characters as they are entered; it will be passed the character
to be checked and a pointer to an argument-block structure.
The function free_fieldtype frees the space allocated for a given validation type.
The function set_fieldtype_arg associates three storage-management functions with a field type. The make_arg function is automatically
applied to the list of arguments you give set_field_type when attaching validation to a field; its job is to bundle these into an allocated
argument-block object which can later be passed to validation predicated. The other two hook arguments should copy and free argument-block
structures. They will be used by the forms-driver code. You must supply the make_arg function, the other two are optional, you may supply
NULL for them. In this case it is assumed that make_arg does not allocate memory but simply loads the argument into a single scalar value.
The form driver requests REQ_NEXT_CHOICE and REQ_PREV_CHOICE assume that the possible values of a field form an ordered set, and provide
the forms user with a way to move through the set. The set_fieldtype_choice function allows forms programmers to define successor and pre-
decessor functions for the field type. These functions take the field pointer and an argument-block structure as arguments.
RETURN VALUE
The pointer-valued routines return NULL on error.
The integer-valued routines return one of the following codes on error:
E_OK The routine succeeded.
E_SYSTEM_ERROR
System error occurred (see errno).
E_BAD_ARGUMENT
Routine detected an incorrect or out-of-range argument.
E_CONNECTED
The field is already connected to a form.
SEE ALSO
curses(3X), form(3X).
NOTES
The header file <form.h> automatically includes the header file <curses.h>.
All of the (char *) arguments of these functions should actually be (void *). The type has been left uncorrected for strict compatibility
with System V.
PORTABILITY
These routines emulate the System V forms library. They were not supported on Version 7 or BSD versions.
AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond.
form_fieldtype(3X)