Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Bash: Find count of a character in a line/word
#!/bin/bash # GNU bash, version 4.3.46 # bash tr command to get count of a character in line/word echo "Count of character 'a' in 'Pakistan is beautiful' is:" echo "Pakistan is beautiful" | tr -cd 'a' | wc -c
run
|
edit
|
history
|
help
0
Update
Alternative time out
Sample
Check regex
Checking set -e behavior in functions
prog1
jhbl
progrm_V
escribir_en_la_memoria.sh
mmm