Hi all,
I have a problem to format data from different database queries into one look. The input data are as follows, every line has the same number of values but a different number of characters:
adata, bdata, cdata, ddata
fffdata, gdata, hdata, idata
jdata, kdata, ... (6 Replies)
I have a very easy one for you this morning :)
A file containing this type of formated data:
500190 488.356
500193 546.7
566486 466.75
506654 288
However, it should be formated like this:
500190 488.356
500193 546.700
566486 466.750
506654 288.000
I know that this can be... (3 Replies)
I have this format of columns
Quote
2 Points:
np x y z
0 767203.9 2120710 917.2959
1 767071.6 2120658 2793.661
Surface Polyline
Color: (0.0400229 1 0.845803)
2 Points:
np x y ... (7 Replies)
I have a file which looks like this:
/* ----------------- EDW$MOC139_R_NNA_BR_SUM_FACT2 ----------------- */
insert_job: EDW$MOC139_R_NNA_BR_SUM_FACT2 job_type: c
command: /home/btchproc/load_process/batch_files/batch_nna_brn_split_sum_fact2.sh m
machine: edwprod02.dsm.pwj.com
#owner:... (29 Replies)
I have a file : e.g.
Charles Dixon Age 23 Hometown Darlington Postcode DL1 2DC
Fred Bixton Age 34 Hometown Leeds Postcode LS1 5XS
Jim Davis Age 48 Hometown Cardiff CF2 8YY
Is it possible to format this file into uniform columns using, say, the spaces as... (11 Replies)
Hi all,
i have written this script:
awk -F';' '
BEGIN {
printf "\n"
printf "\n"
printf "\n"
printf "----------------------------------------------\n"
print " For test "
printf "----------------------------------------------\n"
test_200 = 0
test_300 = 0
test_500 = 0
test_1000 = 0... (11 Replies)
My program output text file data in columns format. My problem is the column headers do not align with the data and if filesystem and Mounted On columns pathname are too long the text will not wrap.
Is there any function in Unix that I can use in my code that will align the data for each... (11 Replies)
Discussion started by: dellanicholson
11 Replies
LEARN ABOUT OPENDARWIN
acct
ACCT(2) BSD System Calls Manual ACCT(2)NAME
acct -- enable or disable process accounting
SYNOPSIS
#include <unistd.h>
int
acct(const char *file);
DESCRIPTION
The acct() call enables or disables the collection of system accounting records. If the argument file is a nil pointer, accounting is dis-
abled. If file is an existing pathname (null-terminated), record collection is enabled and for every process initiated which terminates
under normal conditions an accounting record is appended to file. Abnormal conditions of termination are reboots or other fatal system prob-
lems. Records for processes which never terminate can not be produced by acct().
For more information on the record structure used by acct(), see /usr/include/sys/acct.h and acct(5).
This call is permitted only to the super-user.
NOTES
Accounting is automatically disabled when the file system the accounting file resides on runs out of space; it is enabled when space once
again becomes available.
RETURN VALUES
On error -1 is returned. The file must exist and the call may be exercised only by the super-user.
ERRORS
Acct() will fail if one of the following is true:
[EPERM] The caller is not the super-user.
[ENOTDIR] A component of the path prefix is not a directory.
[ENAMETOOLONG] A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.
[ENOENT] The named file does not exist.
[EACCES] Search permission is denied for a component of the path prefix, or the path name is not a regular file.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[EROFS] The named file resides on a read-only file system.
[EFAULT] File points outside the process's allocated address space.
[EIO] An I/O error occurred while reading from or writing to the file system.
SEE ALSO acct(5), sa(8)HISTORY
An acct() function call appeared in Version 7 AT&T UNIX.
4th Berkeley Distribution June 4, 1993 4th Berkeley Distribution