Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

syserrlst(5) [bsd man page]

SYSERRLST(5)							File Formats Manual						      SYSERRLST(5)

syserrlst - error message file format DESCRIPTION
mkerrlst(1), creates error message files in the format described below. An ``error message file'' consists of a header, an array of structures specifying the offset and length of each message, and the array of message strings separated by newlines. The message strings are separated by newlines but the newline characters are not included in the size of the message. These newline char- acters serve only to make the file editable or printable (after stripping off the header). The file format is: /* * Definitions used by the 'mkerrlst' program which creates error message * files. * * The format of the file created is: * * struct ERRLSTHDR ehdr; * struct ERRLST emsg[num_of_messages]; * struct { * char msg[] = "error message string"; * char lf = '0; * } [num_of_messages]; * * Note: the newlines are NOT included in the message lengths, the newlines * are present to make it easy to 'cat' or 'vi' the file. */ struct ERRLSTHDR { short magic; short maxmsgnum; short maxmsglen; short pad[5]; /* Reserved */ }; struct ERRLST { off_t offmsg; short lenmsg; }; #define ERRMAGIC 012345 SEE ALSO
mkerrlst(1), syserrlst(3) BUGS
Format of the file isn't necessarily portable between machines. HISTORY
This file format is new with 2.11BSD. 3rd Berkeley Distribution March 7, 1996 SYSERRLST(5)

Check Out this Related Man Page

PERROR(2)							System Calls Manual							 PERROR(2)

perror, syslog - system error messages SYNOPSIS
#include <u.h> #include <libc.h> void perror(char *s) void syslog(int cons, char *logname, char *fmt, ...) DESCRIPTION
Perror produces a short error message on the standard error file describing the last error encountered during a call to the system. First the argument string s is printed, then a colon, then the message and a newline. If s is 0, only the error message and newline are printed. Syslog logs messages in the file named by logname in the directory /sys/log; the file must already exist and should be append-only. Log- name must contain no slashes. The message is a line with several fields: the name of the machine writing the message; the date and time; the message specified by the print(2) format fmt and any following arguments; and a final newline. If cons is set or the log file cannot be opened, the message is also printed on the system console. Syslog can be used safely in multi-threaded programs. SOURCE
/sys/src/libc/port/perror.c /sys/src/libc/9sys/syslog.c SEE ALSO
intro(2), errstr(2), the %r format in print(2) BUGS
Perror is a holdover; the %r format in print(2) is preferred. PERROR(2)
Man Page

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing Embedded Newline from Delimited File

Hey there - a bit of background on what I'm trying to accomplish, first off. I am trying to load the data from a pipe delimited file into a database. The loading tool that I use cannot handle embedded newline characters within a field, so I need to scrub them out. Solutions that I have tried... (7 Replies)
Discussion started by: bbetteridge
7 Replies

2. Shell Programming and Scripting

awk - need to remove unwanted newlines on match

Context: I need to remove unwanted newlines from a data file listing books and associated data. Here is a sample listing ( line numbers included ): 1 360762| Skip-beat! 14 /| 9781421517544| nb | 2008.| Nakamura, Yoshiki.| NAKAMUR | Kyoko Mogami followed 2 her true love Sho to Tokyo to... (6 Replies)
Discussion started by: Bubnoff
6 Replies

3. UNIX for Dummies Questions & Answers

finding string in very long file without newlines

What's the best way to find a string in a very long file without newlines in Unix? The standard utility I'm aware of for finding a string in a single file is grep, but for a long file without newlines, I think the output is just going to be the input. I suppose I could use sed to replace the... (5 Replies)
Discussion started by: aaronpoley
5 Replies

4. UNIX for Dummies Questions & Answers

Renaming files

Hi all, I'm working in a specific directory and I have file names which I'd like to rename but in a way in which I can specify the new filenames as @ARGV or user input at prompt. Can someone shed some light on this? Cheers :) (7 Replies)
Discussion started by: pawannoel
7 Replies

5. Shell Programming and Scripting

Need help with eliminating newlines with Perl

Good morning, I need some help with getting rid of newlines with the output from a MYSQL query and putting the information into the right format that I need. Here is the script as it is today: #!/usr/bin/perl my $uda = system("/opt/incontrol/mysql/bin/mysql -u root -ppassword... (2 Replies)
Discussion started by: brianjb
2 Replies

6. Programming

Cannot understand the C errors

I have this peice of code I was hoping someone could look at. I use valgrind ./a.out to test it and it comes up with errors but none that I can understand. Maybe someone here could help me. The code is here: Neo - Pastbin Link Removed - Do Not Use Pastebin in these Forums (12 Replies)
Discussion started by: Errigour
12 Replies

7. Programming

Help on digestion of C header files for a short program.

I found a very short but very efficient program to handle big sequence file (>30GB), but could not understand it. Wrote to the author but no reply, probably because the program needs comprehensive knowledge of C. Can any C expert "walk me thru" the two header files... (13 Replies)
Discussion started by: yifangt
13 Replies

8. Shell Programming and Scripting

File formatting with newlines

Hi All - I am in need of some help in formating the below file Requirement - 1) replace newlines with space 2) replace '#~# ' with newline ----------------------- sample inputfile a I|abc|abc|aaa#~# I|sddddd|tya|dfg sfd ssss#~# I|tya1|tya2|dfg|sfd|aaa#~#... (5 Replies)
Discussion started by: J1nx007
5 Replies

9. Shell Programming and Scripting

Selectively deleting newlines with sed

I have a file that look like this: >Muestra-1 agctgcgagctgcgaccc gggttatata ggaagagacacacacaccccc >Muestra-2 agctgcg agctgcgacccgggttatataggaagagac acacacaccccc >Muestra-3 agctgcgagctgcgaccc gggttatata ggaagagacacacacaccccc I use the following sed script to remove newlines from... (2 Replies)
Discussion started by: Xterra
2 Replies

Featured Tech Videos