Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux remove last line from file

sed '$d' <file>
sed -i '$d' <file> # to edit in place
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #linux #remove #line #file
ADD COMMENT
Topic
Name
4+7 =