Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #/usr/bin/env bash
- function cdroot()
- {
- while [[ $PWD != '/' && $(dirname `dirname $PWD`) != "$HOME/Documents/TA/netsec2017" ]]; do cd ..; done
- }
- 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
- {
- killall -9 atom
- atom -a s*.txt
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement