Explore BrainMass
Share

Explore BrainMass

    Counting uppercase letters in a file

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    I need to count the number of uppercase letters in the given file "File.txt". Please help me with Bash command(s) to achieve this.

    File.txt:

    ctctatctgcggcgtgtggcggcgagATGTCTCACAGGAAATTCTCAGCTCCCAGGCATGGGTCCTTGGGCTTCCTGCCTCGCAAGCGCAGCAGCCGGCATCGTGGGAAAGTGAAGAGCTTCCCTAAGGATGACGCTTCCAAGCCCGTTCACCTCACAGCCTTTCTGGGTTACAAGGCTGGCATGACCCACATCGTCCGGGAAGTTGACAGGCCAGGATCTAAGGTGAACAAGAAAGAAGTCGTGGAGGCTGTGACCATTGTGGAAACTCCCCCAATGGTGGTTGTGGGCATTGTGGGATATGTTGAGACCCCACGAGGCCTCCGGACCTTCAAGACTGTATTTGCTGAGCACATCAGCGATGAGTGTAAAAGGCGCTTCTATAAGAACTGGCACAAGTCTAAGAAGAAGGCTTTCACCAAGTACTGTAAGAAATGGCAGGATGACACAGGCAAGAAGCAGCTGGAGAAGGACTTCAACAGCATGAAGAAGTACTGCCAGGTCATCCGCATCATTGCCCACACTCAGATGCGTCTGCTTCCTCTACGCCAGAAGAAGGCACACTTGATGGAGATCCAGGTGAATGGAGGCACTGTGGCTGAGAAGCTCGACTGGGCCCGAGAGCGGCTGGAGCAGCAGGTTCCTGTGAACCAGGTGTTTGGGCAGGATGAGATGATTGATGTCATTGGCGTGACAAAAGGCAAAGGGTACAAAGGGGTAACCAGTCGTTGGCATACAAAGAAACTGCCCCGAAAGACCCATCGAGGTTTGCGCAAAGTTGCCTGTATTGGAGCCTGGCACCCTGCCCGTGTTGCCTTCTCTGTGGCTCGAGCTGGGCAGAAAGGCTACCATCACCGAACAGAGATTAACAAGAAGATTTACAAGATTGGTCAAGGCTACCTCATCAAGGATGGCAAACTGATCAAGAACAATGCATCTACTGACTATGACTTGTCTGACAAGAGCATCAACCCACTGGGTGGCTTTGTGCATTATGGTGAGGTGACCAATGACTTCATCATGCTCAAAGGCTGTGTGGTGGGGACCAAGAAGCGAGTACTTACTCTTCGTAAGTCCTTGCTGGTTCAGACCAAACGTCGGGCCCTGGAGAAGATTGACCTGAAGTTCATTGACACCACCTCCAAATTTGGCCATGGTCGCTTCCAGACCATGGAGGAGAAGAAAGCATTTATGGGACCACTCAAGAAAGATCGCATTGCCAAGGAGGAAGGAGCTTGAttccaggaccactttgtgcagatggtggggtctcaccaataaaatatttctactc

    © BrainMass Inc. brainmass.com October 10, 2019, 4:37 am ad1c9bdddf
    https://brainmass.com/computer-science/files/counting-uppercase-letters-file-469611

    Solution Preview

    You can find the original size of file in characters, using:

    wc -c File.txt

    You can use following pipeline to ...

    Solution Summary

    Solution provides an approach that is specific to the given file data, so it will work only with those files that contain only lowercase and uppercase letters.

    $2.19