Last active
January 31, 2022 00:47
-
-
Save irenecasado/92bee77c0a2579e773a6056509d4500a to your computer and use it in GitHub Desktop.
ca_failed_banks.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p | |
cd code | |
curl -s --output banklist.csv https://www.fdic.gov/resources/resolutions/bank-failures/failed-bank-list/banklist.csv | |
touch ca_failed_banks.csv | |
head -1 banklist.csv | |
head -1 banklist.csv > ca_failed_banks.csv | |
cat ca_failed_banks.csv | |
grep CA banklist.csv >> ca_failed_banks.csv | |
ROW_COUNT=`wc -l < ca_failed_banks.csv | xargs` | |
NUM_BANKS=$(($ROW_COUNT - 1)) | |
echo "There are ${NUM_BANKS} failed banks in California" | |
# There are 41 failed banks in California. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment