Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux remove first lines of file

# Example usage (3 options):
tail -n +43 input_file	 # Print from the 43rd line on
sed 1,42d input_file	 # Print from the 43rd line on
sed -i 1,42d input_file	 # Remove the first 42 lines in place (meaning 
	# that the file is changed without having to print the output to a 
    # new file)
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #linux #remove #lines #file
ADD COMMENT
Topic
Name
8+8 =