The tag has no usage guidance.

learn more… | top users | synonyms

7
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 ...
7
votes
3answers
1k 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: root@...
6
votes
3answers
781 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 ...
5
votes
4answers
4k 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: ...
4
votes
9answers
22k views

Is there a way to delay a forced reboot?

I realize this is more appropriate for our company's admin group to field. However, pretend they are unresponsive just for the sake of discussion =) If my system is prompting me to reboot now or in a ...
2
votes
4answers
607 views

How can I copy sanely (not using “Mark”) from the Windows command prompt

Given a very long single command at the command line in Windows, I'd like to simply copy that command into clipboard. I am just looking for the ubiquitous Shift-End , Ctrl-C type functionality almost ...
2
votes
5answers
1k 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 [\...
2
votes
3answers
483 views

What's wrong with this bash prompt?

I use the following entry in ~/.bashrc file to colorize the prompt and display current branch of git repository: PS1='\[\e[1;32m\]\[\u@\h\]\[\e[m\] \[\w\]\[\e[1;1m\]\[$(__git_ps1 " (%s)")\] \[\e[1;1m\...
2
votes
4answers
1k 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 ...
2
votes
1answer
27 views

Trouble using powershell output as a variable in batch file

I can manually run this command from a Windows Command Prompt: powershell (new-timespan -start 01/01/2000 -end (get-date)).days % 14 And it returns a number from 0 to 13. I want to use this result ...
1
vote
4answers
173 views

a unix single-line editor/prompt?

I've got a bash script that would be nicer if when I prompt the user, rather than just asking for input, if it provided a line that the user could edit (but a full text editor would be overkill, it's ...
1
vote
3answers
216 views

Where are all the places Windows environment variables set?

When I run cmd.exe and type 'set' I have a %LIB% variable set. The value is pointing to a folder that doesn't exist, which causes warnings during Visual Studio compiles. Here's the thing... If I go ...
1
vote
1answer
699 views

Change login prompt on Debian server

I need to change a telnet login prompt of Debian 4.0 server. Currently it is of form: hostname login: I need to have just: login: Apparently chnages to /etc/issue.net only influence what is ...
1
vote
1answer
252 views

window 7 UAC aproved unaproved list

Problem: Not able to print reports in CRM because of UAC blocking it. Notes: A user with local admin has clicked no to the UAC prompt in CRM while printing a report. The prompt was for a program ...
0
votes
1answer
1k views

unwanted password prompt pops up on web server?

my web server randomly asks for a password as though basic authentication is turned on. It's an IIS 7 web server and you have to specifically install basic authentication in the roles section. It isn'...
0
votes
0answers
66 views

How to disable linux login prompt for embedded system

we're currently working on an embedded arm system with a LCD attached (similar to a raspberry pi). During the kernel boot process, a customers logo is shown. After kernel boot, the default linux login ...