~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to src/head.c

  • Committer: Colin Watson
  • Date: 2013-10-30 15:48:33 UTC
  • mfrom: (8.3.5 sid)
  • Revision ID: cjwatson@canonical.com-20131030154833-xdt6e1yfffqom1c4
merge from Debian 8.21-1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* head -- output first part of file(s)
2
 
   Copyright (C) 1989-2012 Free Software Foundation, Inc.
 
2
   Copyright (C) 1989-2013 Free Software Foundation, Inc.
3
3
 
4
4
   This program is free software: you can redistribute it and/or modify
5
5
   it under the terms of the GNU General Public License as published by
110
110
Print the first 10 lines of each FILE to standard output.\n\
111
111
With more than one FILE, precede each with a header giving the file name.\n\
112
112
With no FILE, or when FILE is -, read standard input.\n\
113
 
\n\
114
 
"), stdout);
115
 
      fputs (_("\
116
 
Mandatory arguments to long options are mandatory for short options too.\n\
117
 
"), stdout);
 
113
"), stdout);
 
114
 
 
115
      emit_mandatory_arg_note ();
 
116
 
118
117
      fputs (_("\
119
118
  -c, --bytes=[-]K         print the first K bytes of each file;\n\
120
119
                             with the leading '-', print all but the last\n\
860
859
  ok = head (filename, fd, n_units, count_lines, elide_from_end);
861
860
  if (!is_stdin && close (fd) != 0)
862
861
    {
863
 
      error (0, errno, _("closing %s"), quote (filename));
 
862
      error (0, errno, _("failed to close %s"), quote (filename));
864
863
      return false;
865
864
    }
866
865
  return ok;