I need help to solve these requirements: Implement the functionality of the wc and head controls. The wc command will need to use and recognize the -w and -c options. The head command will need to use and recognize the -c and -n options. The functionality of the 2 commands in the C / C ++ application will have to be identical to the functionality of the bash wc and head commands (including using the 2 options or generating error messages). It is not accepted to use the system / exec / execute functions to solve it.
Implement the functionality of the wc and head controls
192 Views Asked by Oana Paraschiv At
0
There are 0 best solutions below
Related Questions in LINUX
- How do I recursively find and replace only in files named index.php on Linux webserver?
- passing text with \n as one argument in shell
- kernel module does not print packet info
- How to send ESC/POS commands to thermal printer in Linux
- (x64 Nasm) Writeline function on Linux
- How do I set the Hive user to something different than the Spark user from within a Spark program?
- Default priority of thread with SCHED_FIFO
- Calling a python function with options from shell script
- How to split a directory into parts without compressing or archiving?
- Cross compile simple standard C program on Linux for Mac
- How to offload NAPI poll function to workqueue
- python netifaces - How to get currently used network interface
- Unexpected output from function
- mingw-64 conflicting declarations when cross-compiling
- Different behavior of async with Visual Studio 2013(Windows8.1) and GCC 4.9(Ubuntu14.10)
Related Questions in UNIX
- passing text with \n as one argument in shell
- C std library don't appear to be linked in object file
- How to split a directory into parts without compressing or archiving?
- Momentjs get current GMT unix time
- Timing packets on a traffic server
- man pages for c variable types
- Blocking in pthread_join()
- PWX-00001 Error opening repository "dtlmsg.txt". RCs = 268/150/2
- Unix c program to calculate pi using threads
- How to perform parallel processes for different groups in a folder?
- Set aliases globally for all users
- wmic csproduct get UUID equivalent for Unix and Mac?
- Send alert for 80% threshold comparing two values from Disk partition
- Unix - Tail Utility would open the file or not
- Redirect Outward of unix os commands to html page
Related Questions in WC
- Bash script to email when wc -l count is below 3
- WC on OSX - Return includes spaces
- count lines with different conditions using awk
- Different result when count line number of a file, using wc -l and cat -n
- Is there a way to use woocommerce forms on other template?
- Suppressing summary information in `wc -l` output
- Using shell commands in knitr and displaying output
- Count how many rows are in one file with defined length to show
- How can I exclude results from a process count containing specific arguments?
- wc in background does not return
- Count occurence of character in files
- bash -gt command with pgrep & wc
- Using grep and wc to search and count matching processes
- "Argument list too long" error when passing a find output as arguments
- bash script input from pipe and wc -m
Related Questions in UNIX-HEAD
- UNIX programming: Head command
- Efficient way to get n middle lines from a very big file
- Using combination of "head" and "tail" to display middle line of the file in Unix
- Heads and Tails - Trying to get first line and last ten lines of each file
- how to filter special characters and blank lines in unix
- Concatenating CSV files in bash preserving the header only once
- How do I get java to exit when piped to head
- how to use tee command to redirect the output to two different commands in tcsh shell
- Remove lines from head and tail of multiple text files and merge
- Expressing tail through a variable
- How can I delete files over (n) days old but leave (n) files regardless of age?
- What does "-" before an argument to "head" do?
- Command HEAD in Cygwin doesn't work
- What's the opposite of head? I want all but the first N lines of a file
- How can I use 'head' in a bash script with a variable?
Related Questions in SYMBOLICC++
- installing Vcpkg to manage c/c++ libraries on windows (Vs Code)
- SymbolicC++ error on linux
- want to retrieve files in the order they were created
- Implement the functionality of the wc and head controls
- Getting a conflicting types error when trying to include this data type in another header file I'm unsure why
- How do I evaluate a Symbolic variable in SymbolicC++?
- Debugging C/C++ project in VScode
- Addition of two arrays not working using pthread
- C++ multiple definition error when including external library
- Error installing SymbolicC++ on unix
- Errors at implementation of SymbolicC++ into existing solution
- A way to display Latex style math equations in the terminal?
- How can I create project using INET and LTE library in omnet++5.5.1
- Problems counting the number of vowels in an array
- c/c++ extension downloading for long time in vscode
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?