Script started on Wed Feb 10 19:39:50 2016 $ ls bin src notes transcripts $ ls /homefuz/    /fuz/.ssh ls: /home/fuz/.ssh: Permission denied $ ls >/dev/null $ ls /o home/fuz/.ssh >/dev/null ls: /home/fuz/.ssh: Permission denied $ ls /home/fuz/.ssh 2>  &2< >/dev/null [1] 11893 $ ls: /home/fuz/.ssh: Permission denied [1] + Done(1) ls /home/fuz/.ssh &2>/dev/null $ ^[[A   ls /home/fuz/.ssh 2>&  /  /dev/null $ echo $0 /usr/local/bin/ksh93 $ ls bin src notes transcripts $ cd src $ ls a.out ini.c sum.c add.c pun sum.core convert pun.c test.ini convert.c rekursion vgcore.1280 hello rekursion.c vgcore.1307 hello.c rekursion.core wc ini sum wc.c $ ed filetest.c filetest.c: No such file or directory a #include int main() { char buf[100]; fgets(stdin, buf, 0 1009 );               buf, 100, stdin); prin    fprintf(stdout, "stdout: %s\ ", buf); fprintf(stderr, "stderr: %s", buf); reut  turn 0; } . ! w 163 !cc -o filetest t filetest.c ! q $ ./fileetestee /usr/local/bin/ksh93: ./fileteste: not found [No such file or directory] $ ./fileetestee /usr/local/bin/ksh93: ./fileteste: not found [No such file or directory] $ ./ful  iletest sdvcadfvsadfvadfv stdout: sdvcadfvsadfvadfv stderr: sdvcadfvsadfvadfv $ echo test | ./filetest stdout: test stderr: test $ ./ful  iltest | wc /usr/local/bin/ksh93: ./filtest: not found 0 0 0 $ ./filetest | wc sdvdfvsdfgbsdfvsdfvadfjkvadn stderr: sdvdfvsdfgbsdfvsdfvadfjkvadn 1 2 37 $ ed filetest.c 163 ,p #include int main() { char buf[100]; fgets(buf, 100, stdin); fprintf(stdout, "stdout: %s", buf); fprintf(stderr, "stderr: %s", buf); return 0; } ,n 1 #include 2 3 int main() { 4 char buf[100]; 5 6 fgets(buf, 100, stdin); 7 fprintf(stdout, "stdout: %s", buf); 8 fprintf(stderr, "stderr: %s", buf); 9 10 return 0; 11 } 6-8c ? j ? h invalid address 6,8c while (fgets(std   buf, 100, stdin) != NULL) { fprintf(stdout, "%d ld\n", ftell(stdin)); } . e w 151 !cc -o filetest filetest.c ! !./filetest sdlvadfvldasfvasd 2306 sdlcasdca 2321 sdcasfdvadfvajnk 2343 asdcvasdifvuhiuh 2365 fewrfiuwerhf 2383 sdfiaerfqei5fewrfasdnhaisudfhaisdufhaieruhf 2432 asduifaeriufhefi 2454 asdfuaisrfiqeruhf 2477 ^D! ,n 1 #include 2 3 int main() { 4 char buf[100]; 5 6 while (fgets(buf, 100, stdin) != NULL) { 7 fprintf(stdout, "%ld\n", ftell(stdin)); 8 } 9 10 return 0; 11 } 10i fseek(0); ^D . 10c fseek(stdin, 0, SEEK_SET); . = 14 a while (fgets(buf, 100, stdin) != NULL) { fprintf(stdout, $ %s\   "%s", buf); } . ,p #include int main() { char buf[100]; while (fgets(buf, 100, stdin) != NULL) { fprintf(stdout, "%ld\n", ftell(stdin)); } fseek(stdin, 0, SEEK_SET); while (fgets(buf, 100, stdin) != NULL) { fprintf(stdout, "%s", buf); } return 0; } . w 257 !cc -o filetest filetest.c ! !./filetest cvdfsvadfv 3120 svadfvkadjfnva 3140 xvsdfvasdf 3156 ^D dcsdfv dcsdfv ^D! ? !./filetest int main() { char buf[100]; while (fgets(buf, 100, stdin) != NULL) { fprintf(stdout, "%ld\n", ftell(stdin)); } fseek(stdin, 0, SEEK_SET); while (fgets(buf, 100, stdin) != NULL) { fprintf(stdout, "%s", buf); } return 0; } ! ,n 1 #include 2 3 int main() { 4 char buf[100]; 5 6 while (fgets(buf, 100, stdin) != NULL) { 7 fprintf(stdout, "%ld\n", ftell(stdin)); 8 } 9 10 fseek(stdin, 0, SEEK_SET); 11 12 while (fgets(buf, 100, stdin) != NULL) { 13 fprintf(stdout, "%s", buf); 14 } 15 16 return 0; 17 } 10c if (fseek(stdin, 0, SEEK_SET) != 0)(  { perror("cano no t      ak  kann sic   nicht suchen"! ); return 1; } . !cc -o filetest filetest.c ! ./fil     w 314 !! cc -o filetest filetest.c ! ! !./filetest sdfcafsdv 849 scdaskdjcnasdjvn 870 sfdvadfviu 885 ^D ^D! ^D$ ^[[A   ^[[A^[[A      ll /usr/local/bin/ksh93: ll: not found [No such file or directory] $ ls a.out ini sum.c add.c ini.c sum.core convert pun test.ini convert.c pun.c vgcore.1280 filetest rekursion vgcore.1307 filetest.c rekursion.c wc hello rekursion.core wc.c hello.c sum $ cat filetest.c #include int main() { char buf[100]; while (fgets(buf, 100, stdin) != NULL) { fprintf(stdout, "%ld\n", ftell(stdin)); } if (fseek(stdin, 0, SEEK_SET) != 0) { perror("kann nicht suchen"); return 1; } while (fgets(buf, 100, stdin) != NULL) { fprintf(stdout, "%s", buf); } return 0; } $ truss ./filetes               echo >./   |./filetest -1 kann nicht suchen: Illegal seek $ ./filetest dscsfdvd 904 ^D^D$ $ $ ^[[A   ./  truss ./filetest mmap(0x0,32768,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366148608 (0x80061d000) issetugid(0x80081db20,0x7fffffffefc3,0x40,0x0,0xffff80080081eb5d,0x0) = 0 (0x0) lstat("/etc",{ mode=drwxr-xr-x ,inode=35,size=116,blksize=7680 }) = 0 (0x0) lstat("/etc/libmap.conf",{ mode=-rw-r--r-- ,inode=12325,size=109,blksize=4096 }) = 0 (0x0) openat(0xffffff9c,0x800621000,0x100000,0x0,0xfffffffffffffc00,0x400298) = 3 (0x3) fstat(3,{ mode=-rw-r--r-- ,inode=12325,size=109,blksize=4096 }) = 0 (0x0) mmap(0x0,109,PROT_READ,MAP_PRIVATE,3,0x0) = 34366181376 (0x800625000) close(3) = 0 (0x0) lstat("/usr",{ mode=drwxr-xr-x ,inode=9,size=16,blksize=4096 }) = 0 (0x0) lstat("/usr/local",{ mode=drwxr-xr-x ,inode=85,size=25,blksize=4096 }) = 0 (0x0) lstat("/usr/local/etc",{ mode=drwxr-xr-x ,inode=15659,size=120,blksize=7680 }) = 0 (0x0) lstat("/usr/local/etc/libmap.d",0x7fffffffc6e8) ERR#2 'No such file or directory' munmap(0x800625000,109) = 0 (0x0) openat(0xffffff9c,0x800617703,0x100000,0x0,0xfffffffffffffc00,0x0) = 3 (0x3) read(3,"Ehnt\^A\0\0\0\M^@\0\0\0J\^A\0\0"...,128) = 128 (0x80) lseek(3,0x80,SEEK_SET) = 128 (0x80) read(3,"/lib:/usr/lib:/usr/lib/compat:/u"...,330) = 330 (0x14a) close(3) = 0 (0x0) access("/lib/libc.so.7",0) = 0 (0x0) openat(0xffffff9c,0x80061e060,0x100000,0x0,0x101010101010101,0x8080808080808080) = 3 (0x3) fstat(3,{ mode=-r--r--r-- ,inode=12661,size=1642904,blksize=131072 }) = 0 (0x0) mmap(0x0,4096,PROT_READ,MAP_PRIVATE|MAP_PREFAULT_READ,3,0x0) = 34366181376 (0x800625000) mmap(0x0,3850240,PROT_NONE,MAP_PRIVATE|MAP_ANON|MAP_NOCORE,-1,0x0) = 34368253952 (0x80081f000) mmap(0x80081f000,1531904,PROT_READ|PROT_EXEC,MAP_PRIVATE|MAP_FIXED|MAP_NOCORE|MAP_PREFAULT_READ,3,0x0) = 34368253952 (0x80081f000) mmap(0x800b95000,49152,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_PREFAULT_READ,3,0x176000) = 34371883008 (0x800b95000) mmap(0x800ba1000,172032,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_FIXED|MAP_ANON,-1,0x0) = 34371932160 (0x800ba1000) munmap(0x800625000,4096) = 0 (0x0) close(3) = 0 (0x0) mmap(0x0,102400,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34366181376 (0x800625000) sysarch(0x81,0x7fffffffe0c8,0x4,0x0,0xffffffffffa8d290,0xffffffff0fffffff) = 0 (0x0) sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) readlink("/etc/malloc.conf",0x7fffffffd7f0,1024) ERR#2 'No such file or directory' issetugid(0x80096b93e,0x7fffffffd7f0,0xffffffffffffffff,0x2,0x3b,0xffffffff0fffffff) = 0 (0x0) mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34372104192 (0x800bcb000) munmap(0x800bcb000,4194304) = 0 (0x0) mmap(0x0,8384512,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34372104192 (0x800bcb000) munmap(0x800bcb000,217088) = 0 (0x0) munmap(0x801000000,3973120) = 0 (0x0) sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) fstat(0,{ mode=crw--w---- ,inode=148,size=0,blksize=4096 }) = 0 (0x0) mmap(0x0,4194304,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34376515584 (0x801000000) ioctl(0,TIOCGETA,0xffffe8f0) = 0 (0x0) ^Dread(0,0x801006000,4096) = 0 (0x0) lseek(0,0x0,SEEK_SET) = 0 (0x0) ^Dread(0,0x801006000,4096) = 0 (0x0) sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGKILL|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) = 0 (0x0) sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) process exit, rval = 0 $ $ ls a.out ini sum.c add.c ini.c sum.core convert pun test.ini convert.c pun.c vgcore.1280 filetest rekursion vgcore.1307 filetest.c rekursion.c wc hello rekursion.core wc.c hello.c sum $ ed ./filetest.c 314 ^D$ . w e3ch   cho foosdvasdfvsda foosdvasdfvsda $ ls a.out ini sum.c add.c ini.c sum.core convert pun test.ini convert.c pun.c vgcore.1280 filetest rekursion vgcore.1307 filetest.c rekursion.c wc hello rekursion.core wc.c hello.c sum $ cat wc.c #include #include void bedingte_ausgabe(int bedingung, int zahl) { if (bedingung) printf("%6d ", zahl); } int main(int argc, char *argv[]) { int zeichen = 0, woerter = 0, zeilen = 0; int gib_zeichen = 0, gib_woerter = 0, gib_zeilen = 0; int next, i; if (argc >= 2) { switch(argv[1][0]) { case 'w': gib_woerter = 1; break; case 'l': gib_zeilen = 1; break; case 'c': gib_zeichen = 1; break; default: printf("Fehler!\n"); return 1; } } else { gib_woerter = gib_zeilen = gib_zeichen = 1; } next = getchar(); while (next != EOF) { if (next == '\n' || next == '\f') zeilen++; if (isspace(next)) woerter++; zeichen++; next = getchar(); } bedingte_ausgabe(gib_zeichen, zeichen); bedingte_ausgabe(gib_woerter, woerter); bedingte_ausgabe(gib_zeilen, zeilen); printf("\n"); ende: return 0; } $ ^[ cp wc.c wc-files.c $ ed wc-files.c 882 1,20n 1 #include 2 #include 3 4 void bedingte_ausgabe(int bedingung, int zahl) 5 { 6 if (bedingung) 7 printf("%6d ", zahl); 8 } 9 10 int main(int argc, char *argv[]) 11 { 12 int zeichen = 0, woerter = 0, zeilen = 0; 13 int gib_zeichen = 0, gib_woerter = 0, gib_zeilen = 0; 14 int next, i; 15 16 if (argc >= 2) { 17 switch(argv[1][0]) { 18 case 'w': 19 gib_woerter = 1; 20 break; 15i  FILE *eingabe; . 16i if (argc >= 3) { eingabe = fopen(/ argv[3 2], "r"); if (NULL    einf gabe == NULL) { perror("K kann e Eingaben   nicht oeffnen"); return 1; }  } } esl  lse { eingabe = stdin; } . 30,40  50p gib_woerter = 1; break; case 'l': gib_zeilen = 1; break; case 'c': gib_zeichen = 1; break; default: printf("Fehler!\n"); return 1; } } else { gib_woerter = gib_zeilen = gib_zeichen = 1; } next = getchar(); 20,30p return 1; } } else { eingabe = stdin; } if (argc >= 2) { switch(argv[1][0]) { case 'w': gib_woerter = 1; 30,40p gib_woerter = 1; break; case 'l': gib_zeilen = 1; break; case 'c': gib_zeichen = 1; break; 50  40,60p default: printf("Fehler!\n"); return 1; } } else { gib_woerter = gib_zeilen = gib_zeichen = 1; } next = getchar(); while (next != EOF) { if (next == '\n' || next == '\f') zeilen++; if (isspace(next)) woerter++; zeichen++; next = getchar(); } 40,60s/getchar()/feg  getc(eingabe)& /p next = fgetc(eingabe); } 5 40,60s/getchar()/fgetc/eingabe)/          / (eingabe)/gp ? ,p #include #include void bedingte_ausgabe(int bedingung, int zahl) { if (bedingung) printf("%6d ", zahl); } int main(int argc, char *argv[]) { int zeichen = 0, woerter = 0, zeilen = 0; int gib_zeichen = 0, gib_woerter = 0, gib_zeilen = 0; int next, i; FILE *eingabe; if (argc >= 3) { eingabe = fopen(argv[2], "r"); if (eingabe == NULL) { perror("kann Eingabe nicht oeffnen"); return 1; } } else { eingabe = stdin; } if (argc >= 2) { switch(argv[1][0]) { case 'w': gib_woerter = 1; break; case 'l': gib_zeilen = 1; break; case 'c': gib_zeichen = 1; break; default: printf("Fehler!\n"); return 1; } } else { gib_woerter = gib_zeilen = gib_zeichen = 1; } next = fgetc(eingabe); while (next != EOF) { if (next == '\n' || next == '\f') zeilen++; if (isspace(next)) woerter++; zeichen++; next = fgetc(eingabe); } bedingte_ausgabe(gib_zeichen, zeichen); bedingte_ausgabe(gib_woerter, woerter); bedingte_ausgabe(gib_zeilen, zeilen); printf("\n"); ende: return 0; } w 1075 !cc -o wc-files wc-files.c ! ./wc-files ? v !./wc-files sfvdgfvbsrgfb sdcvasdvaerf ^D 27 2 2 ! . ./  !./& wc-file wc-files.c ./wc-file: not found ! !./wc-files wc-files.c sdsfvd d.   ^D 2 ! . !./wc-files w wc-files.c 252 ! !./wc-files w wcf-  -file.c kann Eingabe nicht oeffnen: No such file or directory ! q $ ls a.out ini.c test.ini add.c pun vgcore.1280 convert pun.c vgcore.1307 convert.c rekursion wc filetest rekursion.c wc-files filetest.c rekursion.core wc-files.c hello sum wc.c hello.c sum.c ini sum.core $ rm vgcore.* $ catz i    ini.c #include #define LEN 100 int main() { struct ini_eintrag { char schluessel[100]; int wert; } eintrag, eintraege[LEN]; int n = 0, i; while (n < LEN) { if (scanf("%99[^=]=%d\n", eintrag.schluessel, &eintrag.wert) < 2) break; eintraege[n++] = eintrag; } for (i = 0; i < n; i++) { printf("\"%s\",%d\n", eintraege[i].schluessel, eintraege[i].wert); } return 0; } $ $ ls a.out ini sum.c add.c ini.c sum.core convert pun test.ini convert.c pun.c wc filetest rekursion wc-files filetest.c rekursion.c wc-files.c hello rekursion.core wc.c hello.c sum $ cat pun.c #include #include int main(int argc, char *argv[]) { union { double d; unsigned char c[8]; } dc; int i; dc.d = atof(argv[1]); for (i = 0; i < 8; i++) printf("%02x", dc.c[i]); printf("\n"); return 0; } $ cat piun   un ELF >0@@ @8@@@@@@@@@@   ` ` 8 8 `8 `pp@@00Ptd``@`@$$Qtd/libexec/ld-elf.so.1FreeBSDJFreeBSD  @@@ ݣk|Pv 72 H)>J1* `O ` `_Jv_RegisterClasseslibc.so.7__prognameenvironatofprintf_init_tlsatexit_endFBSD_1.0(zT ` ` ` ` `HJH5 % @% h% h% h% h% hUHAWAVAUATSPIM>IcMlH= uL- IE~%IHuHHn H/tu8 `Ht H_h8 `H@@E1 ` `H)HH?H=HHtA ` `H)HH?H=HHJ `Hr DLLII9r1۸ ` `H)HH?H=HHtH ` `H)II?I=IIH `Hr DLLHL9rDLLvf.UHSP ` `H)HH?H=HHt!fH `HHvHuH[]EUH t#HH  H  HHu ]ff.UHH= tHt0 `]]ÐUHH0E}HuHuH~IEE}+H<%V@HcEtEEEH<%[@E܉H0]ÐUHSPH H `tHHHuH[]ÐHH%02x ;$@Ph zRx $vAC JDSAC BdAC  @ H@H@o@@@ ]  `x@@o @oo@8 `@@@@"@\@( `$FreeBSD: releng/10.2/lib/csu/amd64/crt1.c 245133 2013-01-07 17:58:27Z kib $$FreeBSD: releng/10.2/lib/csu/common/crtbrand.c 286664 2015-08-12 14:02:56Z gjb $$FreeBSD: releng/10.2/lib/csu/common/ignore_init.c 245133 2013-01-07 17:58:27Z kib $FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512$FreeBSD: releng/10.2/lib/csu/amd64/crti.S 217105 2011-01-07 16:07:51Z kib $$FreeBSD: releng/10.2/lib/csu/amd64/crtn.S 217105 2011-01-07 16:07:51Z kib $.symtab.strtab.shstrtab.interp.note.tag.gnu.hash.dynsym.dynstr.gnu.version.gnu.version_r.rela.plt.init.text.fini.rodata.eh_frame_hdr.eh_frame.ctors.dtors.jcr.dynamic.got.plt.data.bss.comment@#@01H@H<-o@07 @?@]Go@To @  c@@@x m@h@`s0@0yH@H2V@V`@`$@ `  ` 0 `0 8 `8 p ` @ `  ` 0  `4 @@H@@@@@ @ @@ @ @ 0@ H@V@`@@ ` `0 `8 ` ` ` `@&0@5 @S?t ` `0 ` @5 ` ` P@"? `( ` @0 `+ @6AG `] `n ` ` ` ` `8 ` 0@v  ` H@ $)5I `V `b `j `o1~ ` @ @/usr/src/lib/csu/amd64/crt1.cabitagcrt_noinit_tagfinalizer/usr/src/gnu/lib/csu/../../../contrib/gcc/crtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST____do_global_dtors_aux__do_global_dtors_aux.completed__do_global_dtors_aux.pframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_auxpun.c__preinit_array_start__fini_array_end_GLOBAL_OFFSET_TABLE___preinit_array_end__fini_array_start__init_array_end__init_array_start_DYNAMIC_start_Jv_RegisterClasses__progname_finiprintf@@FBSD_1.0atof@@FBSD_1.0atexit@@FBSD_1.0_init_tls@@FBSD_1.0__dso_handle__bss_startenviron_endexit@@FBSD_1.0_edatamain_init$ $ ls a.out ini sum.c add.c ini.c sum.core convert pun test.ini convert.c pun.c wc filetest rekursion wc-files filetest.c rekursion.c wc-files.c hello rekursion.core wc.c hello.c sum $ ./ini foo=10 bar=20 test=30 ^D"foo",10 "bar",20 "test",30 $ cp ini.c ini2bin.c $ ed ini2bin.c 408 ,p #include #define LEN 100 int main() { struct ini_eintrag { char schluessel[100]; int wert; } eintrag, eintraege[LEN]; int n = 0, i; while (n < LEN) { if (scanf("%99[^=]=%d\n", eintrag.schluessel, &eintrag.wert) < 2) break; eintraege[n++] = eintrag; } for (i = 0; i < n; i++) { printf("\"%s\",%d\n", eintraege[i].schluessel, eintraege[i].wert); } return 0; } -50,$     $-50  20,$n 7 char schluessel[100]; 8 int wert; 9 } eintrag, eintraege[LEN]; 10 11 int n = 0, i; 12 13 while (n < LEN) { 14 if (scanf("%99[^=]=%d\n", eintrag.schluessel, 15 &eintrag.wert) < 2) 16 break; 17 18 eintraege[n++] = eintrag; 19 } 20 21 for (i = 0; i < n; i++) { 22 printf("\"%s\",%d\n", eintraege[i].schluessel, 23 eintraege[i].wert); 24 } 25 26 return 0; 27 } 21,24c fwrite(eintraege, sizeof eintrag ege[0], m n, stdout); . q w 355 ./  !cc -o ini2bin ini2bin.c ! !!  ! ! cc   !./ini2bin test=0 mehrtest=1 teste=  2=9001 ^Dtestm$`H`PsL`mehrtest$`H`PsL`test2st$`H`PsL`)#! ,p   ^D$ ,  $ ^[[A   !! /usr/local/bin/ksh93: !!: not found [No such file or directory] $ ed ini2bin.c 355 ,p #include #define LEN 100 int main() { struct ini_eintrag { char schluessel[100]; int wert; } eintrag, eintraege[LEN]; int n = 0, i; while (n < LEN) { if (scanf("%99[^=]=%d\n", eintrag.schluessel, &eintrag.wert) < 2) break; eintraege[n++] = eintrag; } fwrite(eintraege, sizeof eintraege[0], n, stdout); return 0; } ^D$ ls a.out ini.c sum.c add.c ini2bin sum.core convert ini2bin.c test.ini convert.c pun wc filetest pun.c wc-files filetest.c rekursion wc-files.c hello rekursion.c wc.c hello.c rekursion.core ini sum $ cat test.ini test=0 antwort=42 c=64 durchmesser=5 bit=8 $ test.ini <          ini   ./ini2bin 2 3 #define LEN 100 4 5 int main() { 6 struct ini_eintrag { 7 char schluessel[100]; 8 int wert; 9 } eintrag, eintraege[LEN]; 10 11 int n = 0, i; 12 13 while (n < LEN) { 14 if (scanf("%99[^=]=%d\n", eintrag.schluessel, 15 &eintrag.wert) < 2) 16 break; 17 18 eintraege[n++] = eintrag; 19 } 20 21 fwrite(eintraege, sizeof eintraege[0], n, stdout); 22 23 return 0; 24 } 1, a,  #include . 14i m  mesm  mset(&eintrag, 0, sizeof eintrage ); . !cc -o ini2bin ini2bin.c ! w 414 !! cc -o ini2bin ini2bin.c ! ./  !./inib 2bin #include #define LEN 100 int main() { struct ini_eintrag { char schluessel[100]; int wert; } eintrag, eintraege[LEN]; int n = 0, i; memset(&eintrag, 0, sizeof eintrag); while (n < LEN) { if (scanf("%99[^=]=%d\n", eintrag.schluessel, &eintrag.wert) < 2) break; eintraege[n++] = eintrag; } fwrite(eintraege, sizeof eintraege[0], n, stdout); return 0; } mb  ,n 1 #include 2 #include 3 4 #define LEN 100 5 6 int main() { 7 struct ini_eintrag { 8 char schluessel[100]; 9 int wert; 10 } eintrag, eintraege[LEN]; 11 12 int n = 0, i; 13 14 memset(&eintrag, 0, sizeof eintrag); 15 while (n < LEN) { 16 if (scanf("%99[^=]=%d\n", eintrag.schluessel, 17 &eintrag.wert) < 2) 18 break; 19 20 eintraege[n++] = eintrag; 21 } 22 23 fwrite(eintraege, sizeof eintraege[0], n, stdout); 24 25 return 0; 26 } h 23c if (fe write(eintraege, sizeof eintraege[0], n, stdout)  != n) {  if (feof(sto dout( ) )   ) { printf("Ausgabe zu Ende." \n"); } else { perror("Azsg   usgabefehler"); } return 1; } . w 539 !cc -o ini2bin ini2bin.c ! ./  !./ini2bin /dev/full cannot create /dev/full: Operation not supported ! ^D$ ^[[A^[[B       Script done on Wed Feb 10 20:40:43 2016