Write a shell program to count number of characters, number of lines and no. of other symbols in a given file.
To create a shell script to count the number of characters, lines, and other symbols in a given file, you can use a combination of shell commands such as `wc`, `grep`, and `tr`. Here's a basic script to achieve this:
```bash
#!/bin/bash
# Check if a file is provided as an argument
if [ $# -eq 0 ]; then
echo "Usage: $0 <filename>"
exit 1
________ ____ _______ ___ ________ __________ _____ ___ ___ __________ __________ ____.
__________ _____ _________ ___ _____ __________ _______ ___ ______ __________.
______ ____ ______ ___ __________ __________ _________ _____ _________.
__________ ______ _________ ____ __________ ___.
__________ _______ __________ _______ ___ __________.
____ ___ _____ ______ __________ _________ _________ _________ ___ ______ ________ __________.
__________ ________ _______ _____ ______.
_____ ________ _______ ______ ___ _________ __________ __________.
_________ ______ __________ ____ ___ _________ _____ ______ _________ _________.
____ _______ _____ ___ ___ _________.
__________ __________ _____ ______ ____ __________ _______ _____ ________ ___ _______ _______.
____ ___ _________ __________ _______.
____ _____ _____ _____ _______ ___ ______.
______ ______ ______ ___ ___ ____ _____ ______ ____.
________ _______ ______ ___ ____.
___ ___ ________ ________ __________ _____ ______ _______ ___.
_________ _____ _______ ____ ______ __________.
___ ____ _______ ____ _____ ____ _____ ____ ________ _______.
____ ___ ____ ______ _________.
_______ _______ ____ ________ ___ ____ ________ ____ _____ ___ ____.
________ _____ ______ __________ ________ _____ ____ _______.
______ ____ _______ _________ ________ __________ _______.
_______ _______ _________ __________ _____ _______ ______ _________ _________ ___ _____ _______.
_____ _______ _______ ______ ________ ________.
____ ______ ________ _____ ____.
____ _____ _______ __________ __________ _______ ____.
__________ _______ ________ _________ _______ ______ _________ ___ _______ _______.
- Solved Assignments
- Study Notes
- Guess Papers
- Question Papers
✓ Unlock up to 60% of the answer
✓ No payment required