Debian Codegraph @

po/da/man2/tee.2.po

raw
1 # Danish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Joe Hansen <[email protected]>, 2026.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.29.1\n"
8 "POT-Creation-Date: 2026-06-05 06:48+0200\n"
9 "PO-Revision-Date: 2026-03-25 18:36+0100\n"
10 "Last-Translator: Joe Hansen <[email protected]>\n"
11 "Language-Team: Danish <[email protected]>\n"
12 "Language: da\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
18 #. type: TH
19 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
20 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
21 #, no-wrap
22 msgid "tee"
23 msgstr "tee"
24
25 #. type: TH
26 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
27 #: opensuse-tumbleweed
28 #, no-wrap
29 msgid "2026-02-08"
30 msgstr "8. februar 2026"
31
32 #. type: TH
33 #: archlinux debian-unstable
34 #, no-wrap
35 msgid "Linux man-pages 6.18"
36 msgstr "Linux man-pages 6.18"
37
38 #. type: SH
39 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
40 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
41 #, no-wrap
42 msgid "NAME"
43 msgstr "NAVN"
44
45 #. type: Plain text
46 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
47 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
48 msgid "tee - duplicating pipe content"
49 msgstr "tee - duplikere datakanalindhold"
50
51 #. type: SH
52 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
53 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
54 #, no-wrap
55 msgid "LIBRARY"
56 msgstr "BIBLIOTEK"
57
58 #. type: Plain text
59 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
60 #: opensuse-leap-16-1 opensuse-tumbleweed
61 msgid "Standard C library (I<libc>,\\ I<-lc>)"
62 msgstr "C-standardbibliotek (I<libc>,\\ I<-lc>)"
63
64 #. type: SH
65 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
66 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
67 #, no-wrap
68 msgid "SYNOPSIS"
69 msgstr "SYNOPSIS"
70
71 #. type: Plain text
72 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
73 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
74 #, no-wrap
75 msgid ""
76 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
77 "B<#include E<lt>fcntl.hE<gt>>\n"
78 msgstr ""
79 "B<#define _GNU_SOURCE> /* Se feature_test_macros(7) */\n"
80 "B<#include E<lt>fcntl.hE<gt>>\n"
81
82 #. type: Plain text
83 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
84 #: opensuse-leap-16-1 opensuse-tumbleweed
85 #, no-wrap
86 msgid "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<size>B<, unsigned int >I<flags>B<);>\n"
87 msgstr "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<size>B<, unsigned int >I<flags>B<);>\n"
88
89 #. Return type was long before glibc 2.7
90 #. type: SH
91 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
92 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
93 #, no-wrap
94 msgid "DESCRIPTION"
95 msgstr "BESKRIVELSE"
96
97 #
98 #
99 #. Example programs http://brick.kernel.dk/snaps
100 #. add a "tee(in, out1, out2)" system call that duplicates the pages
101 #. (again, incrementing their reference count, not copying the data) from
102 #. one pipe to two other pipes.
103 #. type: Plain text
104 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
105 #: opensuse-leap-16-1 opensuse-tumbleweed
106 msgid ""
107 "B<tee>() duplicates up to I<size> bytes of data from the pipe referred to "
108 "by the file descriptor I<fd_in> to the pipe referred to by the file "
109 "descriptor I<fd_out>. It does not consume the data that is duplicated from "
110 "I<fd_in>; therefore, that data can be copied by a subsequent B<splice>(2)."
111 msgstr ""
112 "B<tee>() duplikerer op til I<size> databyte fra datakanalen refereret til af "
113 "fildeskriptoren I<fd_in> til datakanalen refereret til af fildeskriptoren "
114 "I<fd_out>. Forbruger ikke dataene der er duplikeret fra I<fd_in>; dataene "
115 "kan derfor efterfølgende kopieres af en B<splice>(2)."
116
117 #. type: Plain text
118 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
119 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
120 msgid ""
121 "I<flags> is a bit mask that is composed by ORing together zero or more of "
122 "the following values:"
123 msgstr ""
124 "I<flag> er en bit-maske der er sammensat af at ORing'e sammen nul eller "
125 "flere af de følgende værdier:"
126
127 #. type: TP
128 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
129 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
130 #, no-wrap
131 msgid "B<SPLICE_F_MOVE>"
132 msgstr "B<SPLICE_F_MOVE>"
133
134 #. type: Plain text
135 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
136 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
137 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
138 msgstr "Har i øjeblikket ingen effekt for B<tee>(); se B<splice>(2)."
139
140 #. type: TP
141 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
142 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
143 #, no-wrap
144 msgid "B<SPLICE_F_NONBLOCK>"
145 msgstr "B<SPLICE_F_NONBLOCK>"
146
147 #. type: Plain text
148 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
149 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
150 msgid "Do not block on I/O; see B<splice>(2) for further details."
151 msgstr "Bloker ikke en I/O; se B<splice>(2) for yderligere detaljer."
152
153 #. type: TP
154 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
155 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
156 #, no-wrap
157 msgid "B<SPLICE_F_MORE>"
158 msgstr "B<SPLICE_F_MORE>"
159
160 #. type: Plain text
161 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
162 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
163 msgid ""
164 "Currently has no effect for B<tee>(), but may be implemented in the future; "
165 "see B<splice>(2)."
166 msgstr ""
167 "Har i øjeblikket ingen effekt for B<tee>(), men kan blive implementeret i "
168 "fremtiden; se B<splice>(2)."
169
170 #. type: TP
171 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
172 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
173 #, no-wrap
174 msgid "B<SPLICE_F_GIFT>"
175 msgstr "B<SPLICE_F_GIFT>"
176
177 #. type: Plain text
178 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
179 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
180 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
181 msgstr "Ubrugt for B<tee>(); se B<vmsplice>(2)."
182
183 #. type: SH
184 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
185 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
186 #, no-wrap
187 msgid "RETURN VALUE"
188 msgstr "RETURVÆRDI"
189
190 #. type: Plain text
191 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
192 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
193 msgid ""
194 "Upon successful completion, B<tee>() returns the number of bytes that were "
195 "duplicated between the input and output. A return value of 0 means that "
196 "there was no data to transfer, and it would not make sense to block, because "
197 "there are no writers connected to the write end of the pipe referred to by "
198 "I<fd_in>."
199 msgstr ""
200 "Ved succesfuld fuldførelse returnerer B<tee>() antallet af byte, der blev "
201 "duplikeret mellem inddata og uddata. En returværdi på 0 betyder at der ingen "
202 "data var at overføre, og det ville give mening at blokere, da der ingen "
203 "skrivere er forbundet til skriveslutningen af datakanalen refereret til af "
204 "I<fd_in>."
205
206 #. type: Plain text
207 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
208 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
209 msgid ""
210 "On error, B<tee>() returns -1 and I<errno> is set to indicate the error."
211 msgstr ""
212 "Ved fejl returnerer B<tee>() -1 og I<errno> angives for at indikere fejlen."
213
214 #. type: SH
215 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
216 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
217 #, no-wrap
218 msgid "ERRORS"
219 msgstr "FEJL"
220
221 #. type: TP
222 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
223 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
224 #, no-wrap
225 msgid "B<EAGAIN>"
226 msgstr "B<EAGAIN>"
227
228 #. type: Plain text
229 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
230 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
231 msgid ""
232 "B<SPLICE_F_NONBLOCK> was specified in I<flags> or one of the file "
233 "descriptors had been marked as nonblocking (B<O_NONBLOCK>)B<,> and the "
234 "operation would block."
235 msgstr ""
236 "B<SPLICE_F_NONBLOCK> var angivet i I<flag> eller en af fildeskriptorerne er "
237 "blevet markeret som ikkeblokerende (B<O_NONBLOCK>)B<,> og operationen ville "
238 "blokere."
239
240 #. type: TP
241 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
242 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
243 #, no-wrap
244 msgid "B<EINVAL>"
245 msgstr "B<EINVAL>"
246
247 #. type: Plain text
248 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
249 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
250 msgid ""
251 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
252 "refer to the same pipe."
253 msgstr ""
254 "I<fd_in> eller I<fd_out> refererer ikke til en datakanal; eller I<fd_in> og "
255 "I<fd_out> refererer til den samme datakanal."
256
257 #. type: TP
258 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
259 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
260 #, no-wrap
261 msgid "B<ENOMEM>"
262 msgstr "B<ENOMEM>"
263
264 #. type: Plain text
265 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
266 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
267 msgid "Out of memory."
268 msgstr "Ikke nok hukommelse."
269
270 #. type: SH
271 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
272 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
273 #, no-wrap
274 msgid "STANDARDS"
275 msgstr "STANDARDER"
276
277 #. type: Plain text
278 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
279 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
280 msgid "Linux."
281 msgstr "Linux."
282
283 #. type: SH
284 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
285 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
286 #, no-wrap
287 msgid "HISTORY"
288 msgstr "HISTORIK"
289
290 #. type: Plain text
291 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
292 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
293 msgid "Linux 2.6.17, glibc 2.5."
294 msgstr "Linux 2.6.17, glibc 2.5."
295
296 #. type: SH
297 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
298 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
299 #, no-wrap
300 msgid "NOTES"
301 msgstr "NOTER"
302
303 #. type: Plain text
304 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
305 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
306 msgid ""
307 "Conceptually, B<tee>() copies the data between the two pipes. In reality "
308 "no real data copying takes place though: under the covers, B<tee>() assigns "
309 "data to the output by merely grabbing a reference to the input."
310 msgstr ""
311 "Konceptuelt kopierer B<tee>() dataene mellem de to datakanaler. I "
312 "virkeligheden sker der dog ingen reel datakopiering: under overfladen "
313 "tildeler B<tee>() data til resultatet ved bare at fange en reference til "
314 "dataene."
315
316 #. type: SH
317 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
318 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
319 #, no-wrap
320 msgid "EXAMPLES"
321 msgstr "EKSEMPLER"
322
323 #. type: Plain text
324 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
325 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
326 msgid ""
327 "The example below implements a basic B<tee>(1) program using the B<tee>() "
328 "system call. Here is an example of its use:"
329 msgstr ""
330 "Eksemplet nedenfor implementerer et grundlæggende B<tee>(1)-program via "
331 "systemkaldet B<tee>(). Her er et eksempel på dets brug:"
332
333 #. type: Plain text
334 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
335 #: opensuse-tumbleweed
336 #, no-wrap
337 msgid ""
338 "$B< date | ./a.out out.log | cat>;\n"
339 "Tue Oct 28 10:06:00 CET 2014\n"
340 "$B< cat out.log>;\n"
341 "Tue Oct 28 10:06:00 CET 2014\n"
342 msgstr ""
343 "$B< date | ./a.out out.log | cat>;\n"
344 "Tue Oct 28 10:06:00 CET 2014\n"
345 "$B< cat out.log>;\n"
346 "Tue Oct 28 10:06:00 CET 2014\n"
347
348 #. type: SS
349 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
350 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
351 #, no-wrap
352 msgid "Program source"
353 msgstr "Programkilde"
354
355 #. type: Plain text
356 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
357 #: opensuse-leap-16-1 opensuse-tumbleweed
358 #, no-wrap
359 msgid ""
360 "#define _GNU_SOURCE\n"
361 "#include E<lt>errno.hE<gt>\n"
362 "#include E<lt>fcntl.hE<gt>\n"
363 "#include E<lt>limits.hE<gt>\n"
364 "#include E<lt>stdio.hE<gt>\n"
365 "#include E<lt>stdlib.hE<gt>\n"
366 "#include E<lt>sys/types.hE<gt>\n"
367 "#include E<lt>unistd.hE<gt>\n"
368 "\\&\n"
369 "int\n"
370 "main(int argc, char *argv[])\n"
371 "{\n"
372 " int fd;\n"
373 " ssize_t size, ssize;\n"
374 "\\&\n"
375 " if (argc != 2) {\n"
376 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\[rs]n\", argv[0]);\n"
377 " exit(EXIT_FAILURE);\n"
378 " }\n"
379 "\\&\n"
380 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
381 " if (fd == -1) {\n"
382 " perror(\"open\");\n"
383 " exit(EXIT_FAILURE);\n"
384 " }\n"
385 "\\&\n"
386 " for (;;) {\n"
387 " /*\n"
388 " * tee stdin to stdout.\n"
389 " */\n"
390 " size = tee(STDIN_FILENO, STDOUT_FILENO,\n"
391 " INT_MAX, SPLICE_F_NONBLOCK);\n"
392 " if (size E<lt> 0) {\n"
393 " if (errno == EAGAIN)\n"
394 " continue;\n"
395 " perror(\"tee\");\n"
396 " exit(EXIT_FAILURE);\n"
397 " }\n"
398 " if (size == 0)\n"
399 " break;\n"
400 "\\&\n"
401 " /*\n"
402 " * Consume stdin by splicing it to a file.\n"
403 " */\n"
404 " while (size E<gt> 0) {\n"
405 " ssize = splice(STDIN_FILENO, NULL, fd, NULL,\n"
406 " size, SPLICE_F_MOVE);\n"
407 " if (ssize E<lt> 0) {\n"
408 " perror(\"splice\");\n"
409 " exit(EXIT_FAILURE);\n"
410 " }\n"
411 " size -= ssize;\n"
412 " }\n"
413 " }\n"
414 "\\&\n"
415 " close(fd);\n"
416 " exit(EXIT_SUCCESS);\n"
417 "}\n"
418 msgstr ""
419 "#define _GNU_SOURCE\n"
420 "#include E<lt>errno.hE<gt>\n"
421 "#include E<lt>fcntl.hE<gt>\n"
422 "#include E<lt>limits.hE<gt>\n"
423 "#include E<lt>stdio.hE<gt>\n"
424 "#include E<lt>stdlib.hE<gt>\n"
425 "#include E<lt>sys/types.hE<gt>\n"
426 "#include E<lt>unistd.hE<gt>\n"
427 "\\&\n"
428 "int\n"
429 "main(int argc, char *argv[])\n"
430 "{\n"
431 " int fd;\n"
432 " ssize_t size, ssize;\n"
433 "\\&\n"
434 " if (argc != 2) {\n"
435 " fprintf(stderr, \"Brug: %s E<lt>fileE<gt>\\[rs]n\", argv[0]);\n"
436 " exit(EXIT_FAILURE);\n"
437 " }\n"
438 "\\&\n"
439 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
440 " if (fd == -1) {\n"
441 " perror(\"open\");\n"
442 " exit(EXIT_FAILURE);\n"
443 " }\n"
444 "\\&\n"
445 " for (;;) {\n"
446 " /*\n"
447 " * tee-standardind til standardud.\n"
448 " */\n"
449 " size = tee(STDIN_FILENO, STDOUT_FILENO,\n"
450 " INT_MAX, SPLICE_F_NONBLOCK);\n"
451 " if (size E<lt> 0) {\n"
452 " if (errno == EAGAIN)\n"
453 " continue;\n"
454 " perror(\"tee\");\n"
455 " exit(EXIT_FAILURE);\n"
456 " }\n"
457 " if (size == 0)\n"
458 " break;\n"
459 "\\&\n"
460 " /*\n"
461 " * Forbrug standardind ved at samle det i en fil.\n"
462 " */\n"
463 " while (size E<gt> 0) {\n"
464 " ssize = splice(STDIN_FILENO, NULL, fd, NULL,\n"
465 " size, SPLICE_F_MOVE);\n"
466 " if (ssize E<lt> 0) {\n"
467 " perror(\"splice\");\n"
468 " exit(EXIT_FAILURE);\n"
469 " }\n"
470 " size -= ssize;\n"
471 " }\n"
472 " }\n"
473 "\\&\n"
474 " close(fd);\n"
475 " exit(EXIT_SUCCESS);\n"
476 "}\n"
477
478 #. SRC END
479 #. type: SH
480 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
481 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
482 #, no-wrap
483 msgid "SEE ALSO"
484 msgstr "SE OGSÅ"
485
486 #. type: Plain text
487 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
488 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
489 msgid "B<splice>(2), B<vmsplice>(2), B<pipe>(7)"
490 msgstr "B<splice>(2), B<vmsplice>(2), B<pipe>(7)"
491
492 #. type: TH
493 #: debian-trixie
494 #, no-wrap
495 msgid "2024-06-15"
496 msgstr "15. juni 2024"
497
498 #. type: TH
499 #: debian-trixie
500 #, no-wrap
501 msgid "Linux man-pages 6.9.1"
502 msgstr "Linux man-pages 6.9.1"
503
504 #. type: Plain text
505 #: debian-trixie
506 msgid "Standard C library (I<libc>, I<-lc>)"
507 msgstr "C-standardbibliotek (I<libc>, I<-lc>)"
508
509 #. type: Plain text
510 #: debian-trixie
511 #, no-wrap
512 msgid "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
513 msgstr "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
514
515 #
516 #
517 #. Example programs http://brick.kernel.dk/snaps
518 #. add a "tee(in, out1, out2)" system call that duplicates the pages
519 #. (again, incrementing their reference count, not copying the data) from
520 #. one pipe to two other pipes.
521 #. type: Plain text
522 #: debian-trixie
523 msgid ""
524 "B<tee>() duplicates up to I<len> bytes of data from the pipe referred to by "
525 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
526 "I<fd_out>. It does not consume the data that is duplicated from I<fd_in>; "
527 "therefore, that data can be copied by a subsequent B<splice>(2)."
528 msgstr ""
529 "B<tee>() duplikerer op til I<len> databyte fra datakanalen refereret til af "
530 "fildeskriptoren I<fd_in> til datakanalen refereret til af fildeskriptoren "
531 "I<fd_out>. Forbruger ikke dataene der er duplikeret fra I<fd_in>; dataene "
532 "kan derfor efterfølgende kopieres af en B<splice>(2)."
533
534 #. type: Plain text
535 #: debian-trixie fedora-44 fedora-rawhide
536 #, no-wrap
537 msgid ""
538 "$ B<date | ./a.out out.log | cat>\n"
539 "Tue Oct 28 10:06:00 CET 2014\n"
540 "$ B<cat out.log>\n"
541 "Tue Oct 28 10:06:00 CET 2014\n"
542 msgstr ""
543 "$ B<date | ./a.out out.log | cat>\n"
544 "Tue Oct 28 10:06:00 CET 2014\n"
545 "$ B<cat out.log>\n"
546 "Tue Oct 28 10:06:00 CET 2014\n"
547
548 #. type: Plain text
549 #: debian-trixie
550 #, no-wrap
551 msgid ""
552 "#define _GNU_SOURCE\n"
553 "#include E<lt>errno.hE<gt>\n"
554 "#include E<lt>fcntl.hE<gt>\n"
555 "#include E<lt>limits.hE<gt>\n"
556 "#include E<lt>stdio.hE<gt>\n"
557 "#include E<lt>stdlib.hE<gt>\n"
558 "#include E<lt>sys/types.hE<gt>\n"
559 "#include E<lt>unistd.hE<gt>\n"
560 "\\&\n"
561 "int\n"
562 "main(int argc, char *argv[])\n"
563 "{\n"
564 " int fd;\n"
565 " ssize_t len, slen;\n"
566 "\\&\n"
567 " if (argc != 2) {\n"
568 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\[rs]n\", argv[0]);\n"
569 " exit(EXIT_FAILURE);\n"
570 " }\n"
571 "\\&\n"
572 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
573 " if (fd == -1) {\n"
574 " perror(\"open\");\n"
575 " exit(EXIT_FAILURE);\n"
576 " }\n"
577 "\\&\n"
578 " for (;;) {\n"
579 " /*\n"
580 " * tee stdin to stdout.\n"
581 " */\n"
582 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
583 " INT_MAX, SPLICE_F_NONBLOCK);\n"
584 " if (len E<lt> 0) {\n"
585 " if (errno == EAGAIN)\n"
586 " continue;\n"
587 " perror(\"tee\");\n"
588 " exit(EXIT_FAILURE);\n"
589 " }\n"
590 " if (len == 0)\n"
591 " break;\n"
592 "\\&\n"
593 " /*\n"
594 " * Consume stdin by splicing it to a file.\n"
595 " */\n"
596 " while (len E<gt> 0) {\n"
597 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
598 " len, SPLICE_F_MOVE);\n"
599 " if (slen E<lt> 0) {\n"
600 " perror(\"splice\");\n"
601 " exit(EXIT_FAILURE);\n"
602 " }\n"
603 " len -= slen;\n"
604 " }\n"
605 " }\n"
606 "\\&\n"
607 " close(fd);\n"
608 " exit(EXIT_SUCCESS);\n"
609 "}\n"
610 msgstr ""
611 "#define _GNU_SOURCE\n"
612 "#include E<lt>errno.hE<gt>\n"
613 "#include E<lt>fcntl.hE<gt>\n"
614 "#include E<lt>limits.hE<gt>\n"
615 "#include E<lt>stdio.hE<gt>\n"
616 "#include E<lt>stdlib.hE<gt>\n"
617 "#include E<lt>sys/types.hE<gt>\n"
618 "#include E<lt>unistd.hE<gt>\n"
619 "\\&\n"
620 "int\n"
621 "main(int argc, char *argv[])\n"
622 "{\n"
623 " int fd;\n"
624 " ssize_t len, slen;\n"
625 "\\&\n"
626 " if (argc != 2) {\n"
627 " fprintf(stderr, \"Brug: %s E<lt>fileE<gt>\\[rs]n\", argv[0]);\n"
628 " exit(EXIT_FAILURE);\n"
629 " }\n"
630 "\\&\n"
631 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
632 " if (fd == -1) {\n"
633 " perror(\"open\");\n"
634 " exit(EXIT_FAILURE);\n"
635 " }\n"
636 "\\&\n"
637 " for (;;) {\n"
638 " /*\n"
639 " * tee-standardind til standardud.\n"
640 " */\n"
641 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
642 " INT_MAX, SPLICE_F_NONBLOCK);\n"
643 " if (len E<lt> 0) {\n"
644 " if (errno == EAGAIN)\n"
645 " continue;\n"
646 " perror(\"tee\");\n"
647 " exit(EXIT_FAILURE);\n"
648 " }\n"
649 " if (len == 0)\n"
650 " break;\n"
651 "\\&\n"
652 " /*\n"
653 " * Forbrug standardind ved at samle det i en fil.\n"
654 " */\n"
655 " while (len E<gt> 0) {\n"
656 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
657 " len, SPLICE_F_MOVE);\n"
658 " if (slen E<lt> 0) {\n"
659 " perror(\"splice\");\n"
660 " exit(EXIT_FAILURE);\n"
661 " }\n"
662 " len -= slen;\n"
663 " }\n"
664 " }\n"
665 "\\&\n"
666 " close(fd);\n"
667 " exit(EXIT_SUCCESS);\n"
668 "}\n"
669
670 #. type: TH
671 #: fedora-44 fedora-rawhide
672 #, no-wrap
673 msgid "2024-11-17"
674 msgstr "17. november 2024"
675
676 #. type: TH
677 #: fedora-44 fedora-rawhide
678 #, no-wrap
679 msgid "Linux man-pages 6.13"
680 msgstr "Linux man-pages 6.13"
681
682 #. type: TH
683 #: mageia-cauldron
684 #, no-wrap
685 msgid "Linux man-pages 6.17"
686 msgstr "Linux man-pages 6.17"
687
688 #. type: TH
689 #: opensuse-leap-16-1 opensuse-tumbleweed
690 #, no-wrap
691 msgid "Linux man-pages (unreleased)"
692 msgstr "Linux man-pages (ej udgivet)"