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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:16:04+00:00 2026-05-20T01:16:04+00:00

I have the following line: echo -ne \033]0;blah\007 that correctly sets the term name

  • 0

I have the following line:

echo -ne "\033]0;blah\007"

that correctly sets the term name to blah. But if I place that line within a function, as in:

setTermName()
{
  echo -ne "\033]0;blah\007"
}

it doesn’t work anymore. I guess escape sequences are not treated correctly within the function. So my question could be reformulated as: How do you use escape sequences within a function?

I only want to be able to do setTermName foo from command line.

  • 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-20T01:16:05+00:00Added an answer on May 20, 2026 at 1:16 am

    You invoke that echo command from interactive ksh also? Are you sure it understands -ne? It’s not standard. Maybe use printf.

    And you can try to use alias instead.

    UPD: I’ve checked with AIX ksh, the following function worked:

    set_tn()
    {
      printf "\033]0;$1\007"
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following line of code: echo '<INPUT TYPE=submit name=delete value=Delete account onClick=return
I have the following line of PHP: echo <li>.str_replace(http://, , rtrim($row['website'],/)).</li>; That removes the
I have the following line in my IsapiRewrite.ini file: RewriteRule ^/test-url.asp$ http://www.google.co.uk/ [R=301,L] But
I have the following line of text that I need to display <ul><li>Complementary to
I have the following line of code - <a href=/wordpress/wp-content/trackclicks/clickcounter.php?var=<?php echo $var3; ?> onclick=return
I have the following line: <?php echo $this->__(mytext);?>somesometext)moretext and I need a regular expression
I have the following line in my add/edit Course views: echo $this->Form->input( 'Competency', array(
I have the following line: <td><img src=Photos/<? echo $rows['photo1']; ?> height=200 /></td> I don't
I have the following if statement that works fine for an insert but I
In bourne shell I have the following: VALUES=`some command that returns multiple line values`

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.