Last active
August 16, 2021 10:52
-
-
Save tatumroaquin/b12bb0228f086c57c9fa0e11edb8d314 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
#author :ormux | |
#date :2019/08/31 (August 31) | |
#description :reads bookcode based on a given text, originally by clevcode | |
#title :readbookcode.sh | |
#usage :bash readbookcode.sh | |
read -p "bookcode filepath: " code | |
read -p "source filepath: " text | |
while read line; do | |
row=$(echo $line | cut -d\: -f1) | |
col=$(echo $line | cut -d\: -f2) | |
head -n$row $text | tail -n1 | head -c$col | tail -c1 | |
done < $code | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment