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 8735019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:57:34+00:00 2026-06-13T09:57:34+00:00

I searched and found echo -n and printf are solution for this, but they

  • 0

I searched and found “echo -n” and “printf” are solution for this, but they are working a bit quirky on my machines.

here:

[wadhwaso@nxnixd01 ~]$ echo "hello" >> test
[wadhwaso@nxnixd01 ~]$ cat test
hello
[wadhwaso@nxnixd01 ~]$ echo -n "world" >> test
[wadhwaso@nxnixd01 ~]$ cat test
hello
world
[wadhwaso@nxnixd01 ~]$ echo -n " seriously?" >> test
[wadhwaso@nxnixd01 ~]$ cat test
hello
world seriously?

same is the case with “printf”. It works 2nd 3rd 4th time and so on but not the first time.

I am not very comfortable with awk and sed, thats why I wanted to use these.

If I dont have any choice can someone tell me how to add “elevator=noop” in /etc/grub.conf via awk or sed ??

Answer:
sed -i '$s/$/,string/' file ..

  • 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-06-13T09:57:35+00:00Added an answer on June 13, 2026 at 9:57 am

    The -n option controls whether a newline is added at the end of the echo. That very first echo "hello" writes hello\n to the file; that’s where the newline is coming from.

    To add a kernel option try one of these. Each of them searches for the kernel line in grub.conf and appends ” elevator=noop” to the end.

    sed '/kernel/ s/$/ elevator=noop/' /etc/grub.conf
    
    awk '$1 == "kernel" { $0 = $0 " elevator=noop" } { print } ' /etc/grub.conf
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I already searched here and found similar posts related to this post but i
I've searched and found a good discussion here on SO , but it is
Sorry if this is a duplicate question...I've searched around and found similar advice but
Searched a lot about this problem but never found a answer, that solved it.
I've searched for similar questions to mine here, but haven't found a thread that
I have searched and found a previous answer for this question here . The
ive searched this question on google and i've found many answers but none of
I have searched on the net and on this site for a solution but
I searched and found three fairly good posts but all of them were animating
I have searched and found a lot of different things but none that actually

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.