Skip to content

Commit

Permalink
Update update_readme.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeHyungJoo authored Dec 15, 2023
1 parent 893c5af commit 64f8d9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions update_readme.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/bin/bash

# Calculate half the number of files
file_count=$(git ls-files | wc -l)
half_file_count=$((file_count / 2))
file_count=$(git ls-files | grep -E '\.(cpp|cs)$' | wc -l)

# Display values to verify calculations
echo "Total number of files: $file_count"
echo "Half the number of files: $half_file_count"

# Replace placeholder in README.md with the calculated value
sed -i -E "s|^(Total Count of Solved : )[0-9]+|\1$half_file_count|g" README.md
sed -i -E "s|^(Total Count of Solved : )[0-9]+|\1$file_count|g" README.md

0 comments on commit 64f8d9d

Please sign in to comment.