sed '$d' <file> sed -i '$d' <file> # to edit in place
# Basic syntax: sed -i '$d' input_file # Note, -i means that the input_file will be modified in place