HF RL Explorer

Task: Count Occurrences of a Character in a String Using Bash

Task: Count Occurrences of a Character in a String Using Bash: a task in Terminal-Lego-15k (Harbor dataset). Create a Bash script that counts the number of occurrences of a specific character in a given string. The solution must work correctly for all characters, including special characters like…

The task

Create a Bash script that counts the number of occurrences of a specific character in a given string. The solution must work correctly for all characters, including special characters like commas (`,`), semicolons (`;`), and other punctuation marks.

Part of PrimeIntellect/Terminal-Lego-15k.