1. 11
  1.  

  2. 1

    one nice thing to use in combination with cut is rev, which allows to get fields indexed from the back, even if the count of separators varies:

    echo "one-two-three" | rev | cut -f 1 -d "-" | rev

    echo "one-two-three-four" | rev | cut -f 1 -d "-" | rev