10-19-2009
I resolved this without the use of Arrays. I did a MOD operation on the the total number of ID's. I collected the first 5 ID's, performed the operation and saved it to a new file with a variable name. Then I merged all the files together.
Thank you all for your suggestions.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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. UNIX for Dummies Questions & Answers
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
Dear all,
I have basic knowledge of Unix script and her I am trying to process variable length and variable format CSV file.
The file length will depend on the numbers of Earnings/Deductions/Direct Deposits.
And
The format will depend on whether it is Earnings/Deductions or Direct Deposits... (2 Replies)
Discussion started by: chechun
2 Replies
5. Shell Programming and Scripting
Hi,
Can anyone help with a effective solution ?
I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces.
The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Discussion started by: dc18
7 Replies
6. Programming
I successfully compiled code like below.
#include<stdio.h>
#include<string.h>
int main()
{
int co = 9;
char a;
strcpy(a, "hahahah");
printf("co=%d\n", co);
printf("a=%s\n", a);
return 0;
} (7 Replies)
Discussion started by: vistastar
7 Replies
7. Shell Programming and Scripting
Hello All,
I have this script that does stuff like "starting, stopping & restarting" a Daemon Process running on my machine...
My main question is why in part of my code (which you will see below) does the Array Length (i.e. ${#PIDS} )
return "1" when I know the Array is empty..?
Here is... (17 Replies)
Discussion started by: mrm5102
17 Replies
8. Shell Programming and Scripting
Hi All,
I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies
9. Shell Programming and Scripting
while i've used arrays to work with variables, i've never used them to loop through a set of strings and wanted to ask the community for some feedback or assistance.
let me be specific. here's my code:
# URL port Variables
port2195=`nc -z $url2195 2195`
port2196=`nc -z $url2196 2196`... (5 Replies)
Discussion started by: hungryd
5 Replies
10. Shell Programming and Scripting
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
aio.h(3HEAD) Headers aio.h(3HEAD)
NAME
aio.h, aio - asynchronous input and output
SYNOPSIS
#include <aio.h>
DESCRIPTION
The <aio.h> header defines the aiocb structure which includes the following members:
int aio_fildes file descriptor
off_t aio_offset file offset
volatile void* aio_buf location of buffer
size_t aio_nbytes length of transfer
int aio_reqprio request priority offset
struct sigevent aio_sigevent signal number and value
int aio_lio_opcode operation to be performed
This header also includes the following constants:
AIO_ALLDONE A return value indicating that none of the requested operations could be canceled since they are already complete.
AIO_CANCELED A return value indicating that all requested operations have been canceled.
AIO_NOTCANCELED A return value indicating that some of the requested operations could not be canceled since they are in progress.
LIO_NOP A lio_listio(3RT) element operation option indicating that no transfer is requested.
LIO_NOWAIT A lio_listio() synchronization operation indicating that the calling thread is to continue execution while the
lio_listio() operation is being performed, and no notification is given when the operation is complete.
LIO_READ A lio_listio() element operation option requesting a read.
LIO_WAIT A lio_listio() synchronization operation indicating that the calling thread is to suspend until the lio_listio()
operation is complete.
LIO_WRITE A lio_listio() element operation option requesting a write.
SEE ALSO
lseek(2), read(2), write(2), fsync(3C), libaio(3LIB), lio_listio(3RT)
SunOS 5.10 10 Sep 2004 aio.h(3HEAD)