smartcut: quickly cut out a range from file