bash remove last lines from file code example
Example: bash delete the last line of a file
# Basic syntax:
sed -i '$d' input_file
# Note, -i means that the input_file will be modified in place
# Basic syntax:
sed -i '$d' input_file
# Note, -i means that the input_file will be modified in place