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)
Greetings,
I need to take a fixed length file, similar to the following:
<input file>
1233 e 612 i
43378 f 03 x
22 17 e 9899
a 323e a6 z7
read in the character in position 6, and if that character = e, delete that line from the file.
<output file>
43378 f 03 x
22 17 e 9899
... (4 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)
Hi
I need to be search a file of fixed length records and when I hit a particular record that match a search string, substitute a known position field
In the example file below
FHEAD000000000120090806143011
THEAD0000000002Y0000000012 P00000000000000001234
TTAIL0000000003... (0 Replies)
Hello
I've question on the requirement I am working on.
We are getting a fixed length file with "33" characters long. We are processing that file loading into DB.
Now some times we are getting a file with "35" characters long. In this case I have to remove two characters (in 22,23... (14 Replies)
I have a fixed width file of length 53. when is try to get the lengh of the record of that file i get 2 different answers.
awk '{print length;exit}' <File_name>
The above code gives me length 50.
wc -L <File_name>
The above code gives me length 53.
Please clarify on... (2 Replies)
Hi Everyone,
I need to increment a value in the fixed length file. The file has almost a million rows. Is there any easy way to accomplish this.
Ex
input file
ASDSD ADSD 00000 X
AAASD ADSD 00000 X
SDDDD ADSD 00000 X
Ouput
ASDSD ADSD 00001 X
AAASD ADSD 00002 X
SDDDD ADSD 00003 X
... (7 Replies)
Discussion started by: saratha14
7 Replies
LEARN ABOUT SUSE
fixsub
fixsub(3alleg4) Allegro manual fixsub(3alleg4)NAME
fixsub - Safe function to subtract fixed point numbers clamping underflow. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
fixed fixsub(fixed x, fixed y);
DESCRIPTION
Although fixed point numbers can be subtracted with the normal '-' integer operator, that doesn't provide any protection against overflow.
If overflow is a problem, you should use this function instead. It is slower than using integer operators, but if an overflow occurs it
will set `errno' and clamp the result, rather than just letting it wrap. Example:
fixed result;
/* This will put 4965 into `result'. */
result = fixsub(itofix(5000), itofix(35));
/* Sets `errno' and puts -32768 into `result'. */
result = fixsub(itofix(-31000), itofix(3000));
ASSERT(!errno); /* This will fail. */
RETURN VALUE
Returns the clamped result of subtracting `y' from `x', setting `errno' to ERANGE if there was an overflow.
SEE ALSO fixadd(3alleg4), fixmul(3alleg4), fixdiv(3alleg4)Allegro version 4.4.2 fixsub(3alleg4)