-
-
Save louisswarren/ff2c0d7e2ee6d6f7fb69 to your computer and use it in GitHub Desktop.
Script for viewing long files in tty using only head, tail, echo, bc
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
#!/bin/sh | |
# Use to view long files without more or less | |
# One-liner so that it may be easily echo'd to /bin/pcat instead of using ed | |
# Usage: | |
# pcat filename pagenum | |
head -n $(echo "$2 * 20" | bc) $1 | tail -n 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment