Sort and cleanup

This commit is contained in:
Nemo 2022-04-30 15:58:26 +05:30
parent d21044ef56
commit 294650f558
2 changed files with 5 additions and 3 deletions

View File

@ -4,9 +4,7 @@ ISIN Data from various public securities.
Source: [NSDL Website Detailed ISIN Search][nsdl].
Automatically updated every Sunday using GitHub Actions.
Currently tracked:
Automatically updated every midnight (IST).
|File|Issuer|Tracked|
-----|-----|----|
@ -26,6 +24,7 @@ You can run the `fetch.sh` script to generate the tracked the files from scratch
- https://stedolan.github.io/jq/
- https://www.gnu.org/software/parallel/
- https://curl.se/
- https://www.gnu.org/software/sed/
# Structure

View File

@ -59,4 +59,7 @@ sem --wait
for i in E F 9; do
# Sort the file in place
sort -o "IN$i.csv" "IN$i.csv"
# Remove lines that don't start with the correct prefix
# This is to avoid ISINs like INF955L01IN9 showing up under IN9
sed -i '/^IN$i/!d' "IN$i.csv"
done