dotfiles

config files for my linux setup
git clone git://edryd.org/dotfiles
Log | Files | Refs | README

body (354B)


      1 #!/usr/bin/env bash
      2 
      3 # body: print the body of a file
      4 #
      5 # if only two arguments are given print the file given by the first at the line
      6 # number from the second. If a third argument is given print until that line.
      7 
      8 if [[ $# == 2 ]]; then
      9   sed -n $2p $1
     10 elif [[ $# == 3 ]]; then
     11   sed -n $2,$3p $1
     12 else
     13   echo "usage: body FILE LINE [UNTIL]"
     14   exit 1
     15 fi