about summary refs log tree commit diff
path: root/bin/akordy
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2021-09-28 08:37:28 +0200
committerGitHub <noreply@github.com>2021-09-28 08:37:28 +0200
commit0c6da045787cc80d46548180950e694dfb59b0da (patch)
tree052277711fba4e6653454b7d75bc3b10dab3a9ec /bin/akordy
parentd019fa5e4508f248278e67914d21c974f2946f77 (diff)
parent2d6e1d932ac8bfe05a131d1c7b951645b4edb3c2 (diff)
downloadspiewnik-0c6da045787cc80d46548180950e694dfb59b0da.tar.gz
spiewnik-0c6da045787cc80d46548180950e694dfb59b0da.zip
Merge branch 'master' into master
Diffstat (limited to 'bin/akordy')
-rwxr-xr-xbin/akordy19
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/akordy b/bin/akordy
new file mode 100755
index 0000000..74c13a5
--- /dev/null
+++ b/bin/akordy
@@ -0,0 +1,19 @@
+#!/bin/sh
+## Skrypt wypisuje wszystkie akordy z plików txt w ./piosenki
+
+cat piosenki/*.txt | \
+
+ # Wyświetl tylko napis po znaku '|'
+  awk -F "|" '/|/ { print $2 }' | \
+
+  # Usuń linie zawierające 'kapo'
+  grep -v 'kapo' | \
+
+  # Zamień spacje na entery => każdy akord na osobnej linii
+  tr ' ' '\n' | \
+
+  # Usuń puste linie
+  grep '.' | \
+
+  sort | \
+  uniq