Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

what's a commandline tool to take input from stdin, remove the first X character, and place the output to stdout?

Similar to how tail can skip the X lines and display the rest, but for characters on each line instead of lines in each file.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The cut command might fit your needs:

echo "1234567890" | cut -c 6-


share|improve this answer
Oh, that does work - I read through the man page, and it didn't say you could leave off FILE, so I assumed this wouldn't work. Thanks! – David Oneill Apr 20 '12 at 17:26
You're welcome! Square brackets generally mean optional arguments, if you do not specify a file it reads standard input. :) – lgarzo Apr 20 '12 at 17:29
Oh! I hadn't noticed the brackets until you pointed them out. Thanks!!! – David Oneill Apr 20 '12 at 17:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.