Question
head.cpp This all needs to be coded in C++ ./head [-n number] [file...] The head utility shall copy its input files to the standard output,
head.cpp
This all needs to be coded in C++
./head [-n number] [file...]
The head utility shall copy its input files to the standard output, ending the output for each file at a designated point. Copying shall end at the point in each input file indicated by the -n number option. The option- argument number shall be counted in units of lines. If no file operand is specified, or when file is -, then standard input is assumed.
-n number: The first number lines of each input file shall be copied to standard output. The application shall ensure that the number option-argument is a positive decimal integer. When a file contains less than number lines, it shall be copied to standard output in its entirety. This shall not be an error. If no options are specified, head shall act as if -n 10 had been specified.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started