3

I just thought I might get version information about the current bash by entering

bash -v

That brought many lines of code to stdout and left me with a line that appears right above my usual promt

printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"
[foo@bar path]$

I think I have a tiny clue what this might be (the code that renders how the prompt looks like), but I have no idea whatsoever how to get rid of this. Who does?

6

Simply type exit to get out of the new bash shell you invoked.

Explanation

The -v option doesn't do what you think. From bash(1):

-v Display readline variable names and values in such a way that they can be re-read.

So what your command does is start another bash shell with the -v option that prints the various variable names you see in your output.

What you want is

bash --version

Update

Since the OP commented that this sounds too much like a "restart your system" kind of answer, here's an alternative way:

Disable the -v option by issuing

set +v

Note, though, that this will leave you in the child shell you forked earlier by calling bash.

  • Thanks, that did the job. I was afraid this might stay... – Gottlieb Notschnabel May 2 '14 at 1:00
  • @GottliebNotschnabel Please accept the answer then so that everyone can see this question is done. – Hauke Laging May 2 '14 at 2:40
  • @HaukeLaging Yeah, sorry for not having accepted this earlier. But I posed this question yesterday before I went to bed. Now I saw the answer (which helped me) and I wanted to accept it, but would have had to wait another 6 minutes before I could accept. So I postponed accepting to the next day. I apologize. – Gottlieb Notschnabel May 2 '14 at 12:17
  • I like this answer because it's just like 99% of all IT problem solving advices: "Restart your system!" :-) – Gottlieb Notschnabel May 2 '14 at 12:18
  • @GottliebNotschnabel Please see the update :) – Joseph R. May 2 '14 at 12:26

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.