Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6646151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:22:53+00:00 2026-05-26T00:22:53+00:00

I am trying to remove a bunch of ^K from a file in linux

  • 0

I am trying to remove a bunch of ^K from a file in linux for class but everything I have been trying is not working.

so I cat a file memo.txt and it has double spaced lines

I less the file and it has ^K after every line

I am trying to remove the ^K and output it into a new file

I have tried

cat memo.txt | tr -d "\n" > memo.new
cat memo.txt | tr -d "^K" > memo.new

and some other sed functions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:22:54+00:00Added an answer on May 26, 2026 at 12:22 am

    You might want to try something like this:

    tr -d '\013' < memo.txt > memo.new
    

    013 is the octal value for the character ^K.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class generated from a WSDL that has a bunch of public
Currently we have a table with a bunch of data from a database which
I have a bunch on elements with the same name that i am trying
trying remove items in a list not beginning with letters A-E, here is what
I am working on a code that is trying to read in a bunch
I am trying to loop through a bunch of documents I have to put
I'm trying to take a query: SHOW TABLES; which will display a bunch of
I'm trying to get a color picker javascript widget working in a page with
I've imported some data from a CSV file in matlab. They are time series
I am trying to save some images from Flash to Php by sending a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.