Pacific-Design.com

    
Home Index

1. Bash

2. Tools

+ Directories

Bash / Tools /

Count Slash Characters withing a string


$ echo -n "http://pacific-design.com/wp-admin/post.php" | tr -cd  "/" | wc -c
# output = 4

Write to 11to70.txt file lines that length is between 10 to 70 characters


$ cat temp |  awk '{ if((length($1) >= 10) && (length($1) < = 70)) { print $1} }' | tee 10to70.txt