I'm trying to remove columns 75 through 85. The colrm command works, but the problem is that it stops whenever it finds an extended ASCII character in the file.

So, my question is this: is there anyway to delete those columns from files that have extended ASCII in them?

| improve this question | | | | |
  • 1
    “Extended ASCII” is just confusing terminology for “non-ASCII”. What encoding is the file in? Do you want to remove those columns counting in bytes or characters? – Gilles 'SO- stop being evil' Mar 18 '16 at 21:17

This command will remove columns 75 to 85 (counting bytes) from input.txt:

cat input.txt | cut -b 75-85 --complement
| improve this answer | | | | |
  • 1
    A side note: formulating your rather short answer as a question brings it straight to Low-quality queue. I suggest you to write answers in affirmative tone. I made an edit to give you an example, you can re-edit your answer if you like. – Dmitry Grigoryev Mar 18 '16 at 13:06
  • The command you submitted works perfectly. Thank you. – ignatius Mar 19 '16 at 1:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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