aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLibravatar Martin Michalec <martin@michalec.dev>2026-11-10 08:29:58 +0000
committerLibravatar Martin Michalec <martin@michalec.dev>2026-11-10 08:33:56 +0000
commit776276d5c7e67356a880f3e31076d32cdc1c1882 (patch)
treecbde131f3d46338adee9c67ac0f988295736bdd4 /bin
downloadcoursework-776276d5c7e67356a880f3e31076d32cdc1c1882.tar.gz
publishHEADmaster
Diffstat (limited to 'bin')
-rw-r--r--bin/get-card-brands.sh5
-rw-r--r--bin/get-card-types.sh5
-rw-r--r--bin/get-max-address-length.sh5
-rw-r--r--bin/get-max-merchant-length.sh5
-rw-r--r--bin/get-normalized-merchants.sh5
-rw-r--r--bin/get-transaction-use-chips.sh5
6 files changed, 30 insertions, 0 deletions
diff --git a/bin/get-card-brands.sh b/bin/get-card-brands.sh
new file mode 100644
index 0000000..f0b00a5
--- /dev/null
+++ b/bin/get-card-brands.sh
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3set -xe
4
5cat res/cards_data.csv | tail -n +2 | cut -d, -f3 | sort -u
diff --git a/bin/get-card-types.sh b/bin/get-card-types.sh
new file mode 100644
index 0000000..c0103d3
--- /dev/null
+++ b/bin/get-card-types.sh
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3set -xe
4
5cat res/cards_data.csv | tail -n +2 | cut -d, -f4 | sort -u
diff --git a/bin/get-max-address-length.sh b/bin/get-max-address-length.sh
new file mode 100644
index 0000000..3ec8f2c
--- /dev/null
+++ b/bin/get-max-address-length.sh
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3set -xe
4
5cat res/users_data.csv | tail -n +2 | cut -d, -f7 | sort -u | awk '{print length, $0}' | sort -rn | head -n 1 | cut -d' ' -f1
diff --git a/bin/get-max-merchant-length.sh b/bin/get-max-merchant-length.sh
new file mode 100644
index 0000000..09f2d7c
--- /dev/null
+++ b/bin/get-max-merchant-length.sh
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3set -xe
4
5cat res/transactions_data.csv | tail -n +2 | cut -d, -f8 | sort -u | awk '{print length, $0}' | sort -rn | head -n 1 | cut -d' ' -f1
diff --git a/bin/get-normalized-merchants.sh b/bin/get-normalized-merchants.sh
new file mode 100644
index 0000000..f10de8d
--- /dev/null
+++ b/bin/get-normalized-merchants.sh
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3set -xe
4
5cat res/transactions_data.csv | tail -n +2 | cut -d, -f8 | sort -u | tr '[a-z]' '[A-Z]' | tr ' ' '_'
diff --git a/bin/get-transaction-use-chips.sh b/bin/get-transaction-use-chips.sh
new file mode 100644
index 0000000..e655643
--- /dev/null
+++ b/bin/get-transaction-use-chips.sh
@@ -0,0 +1,5 @@
1#!/bin/sh
2
3set -xe
4
5cat res/transactions_data.csv | tail -n +2 | cut -d, -f6 | sort -u