Package: moreutils
Version: 0.45
Tags: patch
Followup-For: Bug #623197

Hi,

I needed this feature for myself, so wrote a little patch.

Michael

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (700, 'testing'), (650, 'unstable'), (600, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-1-686-pae (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages moreutils depends on:
ii  libc6            2.13-21 
ii  libipc-run-perl  0.90-1  
ii  perl             5.14.2-5

moreutils recommends no packages.

Versions of packages moreutils suggests:
ii  libtime-duration-perl  <none>  
ii  libtimedate-perl       1.2000-1

-- no debconf information
45c45
<       printf("sponge <file>: soak up all input from stdin and write it to 
<file>\n");
---
>       printf("sponge [-a] <file>: soak up all input from stdin and write it 
> to <file>\n");
274a275,285
>       int append=0;
>       
>       if (argc == 3) {
>               if(strcmp(argv[1], "-a") == 0) {
>                       append=1;
>                       argc--;
>                       argv++;
>               } else {
>                       usage();
>               }
>       }
338a350
>                       !append &&
347c359
<                       outfile = fopen(outname, "w");
---
>                       outfile = fopen(outname, append?"a":"w");

Reply via email to