Skip to content

Instantly share code, notes, and snippets.

@johsjohsjohs
Last active June 28, 2022 22:52
Show Gist options
  • Select an option

  • Save johsjohsjohs/b9331da52afb04abcc453917220eecef to your computer and use it in GitHub Desktop.

Select an option

Save johsjohsjohs/b9331da52afb04abcc453917220eecef to your computer and use it in GitHub Desktop.
This script will sort 1.md 2.md 3.md than head all the files and get the first line
#!/bin/sh
ls -1 *.md | sort -n|xargs head -1|less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment