Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

remove last n characters from stdin

sed 's/.$//' #To remove the last character
sed 's/.....$//' #To remove the last 5 characters
 
PREVIOUS NEXT
Tagged: #remove #characters #stdin
ADD COMMENT
Topic
Name
2+4 =