An Alias in Case You Don't Have tail
Some System V UNIX versions don't support the tail command (). Here are a shell function and alias named ptail that give you an equivalent:
ptail() {
sed -e :a -e '$q;N;11,$D;ba' $1;
}
alias ptail sed -e :a -e \''$q;N;11,$D;ba'\'
This prints the last ten lines of a file. (Greg Ubben wrote ptail.)
- JP