0
votes
2answers
58 views

making one computers bash prompt match anothers

The computer who's prompt I'm trying to copy: [root@CompanyName-LAMP-DEV:/current/path]$ We'll call that computer computer A. The prompt my computer - computer B - currently has: [root@ip-x-x-x-x ...
2
votes
4answers
818 views

How to lock user in a shell script program?

Let's say I have a Linux OS without desktop environment. After the PC finish boot up, it will directly show the shell terminal to the user. I plan to write a shell script program and make it ...
6
votes
3answers
920 views

Bash: how to know if the last command's output ends with a newline or not?

Most of the time the output of a command ends with the newline character. But sometimes it does not, so the next shell prompt is printed in the same line together with the output. Example: ...
5
votes
4answers
3k views

Prompt customization: how to detect when there is no tty

I have a customized prompt with colors (using tput) and every time I start a non-interactive session in the server I get a bunch of errors. For instance if I start a non-interactive session like this: ...
6
votes
1answer
2k views

Bash custom prompt breaking wrapping of long command lines

I have a custom bash prompt that colours my username, hostname and current working directory. The colours display correctly, however when I type a command line that needs to wrap, the terminal does ...
5
votes
3answers
760 views

Getting more helpful tab completion prompts in bash?

Let's say I have a directory with a few files in it like this: $ ls file1 file2 file3 And I want to do some tab completion in bash: $ cat file<tab> file1 file2 file3 I remember ...
2
votes
5answers
991 views

Who decided the default shell prompts in Linux?

There are a couple of defaults in the standard Linux shell, bash, that I think need some history brought out. This question is about the prompt. The default prompt in bash in many Linux distros is ...