Skip to content

Instantly share code, notes, and snippets.

@dsprenkels
Created June 1, 2017 11:44
Show Gist options
  • Save dsprenkels/0949c398309afc73f4628bca7efd8af2 to your computer and use it in GitHub Desktop.
Save dsprenkels/0949c398309afc73f4628bca7efd8af2 to your computer and use it in GitHub Desktop.
function cdroot()
{
cd .
}
alias prev='cd ../"$(ls -F .. | grep '/' | grep -B1 -xF "${PWD##*/}/" | head -n 1)"'
alias next='cd ../"$(ls -F .. | grep '/' | grep -A1 -xF "${PWD##*/}/" | tail -n 1)"'
function ne
{
cdroot
next
ID=$(ls ../ | grep -e "^s[0-9]*$" | grep -n `basename $PWD` | cut -d: -f1)
TOTAL=$(ls ../ | grep -e "^s[0-9]*$" | wc -l)
echo $ID "/" $TOTAL
grep "Name: " s*.txt
}
function n
{
ne
op
}
function op
{
xreader *.pdf
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment