Skip to content

Command line utility to validate that a given text file has all of a set of characters contained within.

License

Notifications You must be signed in to change notification settings

bryan-lott/char-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

char-check

Requirements

  • Java v1.7+

Usage

Usage: java -jar char-check.jar [OPTION]... [FILE]
Check for the existence of character classes in FILE or standard input.

  -u, --upper        Check for uppercase letters [A-Z]
  -l, --lower        Check for lowercase letters [a-z]
  -n, --number       Check for numbers [0-9]
  -6, --hex          Check for hexidecimal numbers [0-9a-f]
  -p, --punctuation  Check for common punctuation [.,?!&-'";:]
  -s, --symbol       Check for symbols [`~!@#$%^&_-+*/=(){}[]|\:;"'<,>.?}]
  -h, --help
With no FILE, read standard input.

Examples:
    java -jar char-check.jar -l test_file.txt
    echo "abcdefghijklmnopqrstuvwxy" | java -jar char-check.jar -l

Examples

Please note that these can be combined... to check for existence of upper and lowercase letters and digits in a file named testdata.txt the command line should look something like:

java -jar char-check.jar -uln testdata.txt

Alternatively for streaming from stdin:

cat testdata.txt | java -jar char-check.jar -uln

About

Command line utility to validate that a given text file has all of a set of characters contained within.

Resources

License

Stars

Watchers

Forks

Packages

No packages published