The prompt is what asks a user for their interactive input

learn more… | top users | synonyms

4
votes
3answers
191 views

How to redirect output of a command to a file when the command will prompt user inputs?

I have a command which will prompt user for some inputs and then output the result to the terminal. I typed the command like below to redirect the output to a file: $the_command > abc.txt But it ...
0
votes
0answers
9 views

posh-git not reading my profile

I'm using posh-git (part of Github for Windows). I want to set a custom prompt as in this question. However, posh-git is not reading my profile file. I have tried: Running PowerShell as ...
1
vote
1answer
14 views

How to make zsh always show environment variable name instead of the path?

I have an environment variable set to my projects folder like this: PROJ=$HOME/projects When I want to open a project folder i just type PROJ/project_name and the shell opens the directory and my ...
1
vote
1answer
10 views

$status in Fish prompt always prints 0

I tried to add $status to my prompt in the fish shell but it always prints 0. This question was asked on irc a while back and i'm surprised there wasn't a answer here so i thought i'd post it here ...
0
votes
1answer
42 views

command to pipe in password when prompted by command prompt

runas /profile /user:administrator "cmd /c net user /add [username] [password]". I used the above command to create a new user using administrator permissions. After I enter this command, it prompts ...
0
votes
1answer
20 views

My bash_prompt cannot find a shell script

This is a function I added to my .bash_prompt function look_for_autorun() { echo "checking file" FILE="autorun.sh" if [ -x $FILE ] then echo "File '$FILE' Exists" else ...
0
votes
0answers
53 views

Find and delete characters special in text file batch file

Example: three text files: 1.txt contents store is: 7.1M 2.txt is 72M 3.txt is 7.21M I would use batch file to scan these three text files and output: 1.txt is 7 2.txt is 72 3.txt is 7 Thank ...
0
votes
1answer
32 views

how to migrate bash prompt \#/\! to zsh

My bash prompt currently starts with the following variables : \#/\! which means \# The command number of this command. \! The history number of this command. So \# is specific to each ...
1
vote
1answer
64 views

Interactive Script; Prompt within a loop

How do I prompt a user for input from a shell script (ksh) within a loop in which a file is read? The script reads in a file. In each loop pass the user will be asked if he wants to cancel or not? ...
0
votes
0answers
102 views

Alternative ways of passing PS1 env variable into Ubuntu for SSH session

I know that there are twenty thousand answers, none of them worked as expected, I'm more surprised than you are, so please consider reading the story first. I'm trying to achieve what appears to be a ...
4
votes
1answer
184 views

Logging into hotel Wi-Fi changes bash prompt? [duplicate]

Since clicking on the “I agree” pop-up when logging into a hotel Wi-Fi, my bash prompt contains some kind of hash in it. The format is now: <strange hash>:<working dir> <username> ...
0
votes
0answers
33 views

Change the prompt on all xfce-terminals only

I have two terminals installed, gnome-terminal and xfce4-terminal. I would like to have only the xfce terminal showing a simple > as prompt when I start it. The gnome-terminal should remain ...
0
votes
1answer
280 views

Kill Process Listening on Port 8080

I perform the following on Win7 32-Bit in the command prompt: netstat -ano | findstr 8080 it returns with: TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 1896 how might I ...
0
votes
2answers
676 views

How to turn off asking for administrative rights every time I want to rename/copy file from one location to another in Windows 8.1 64bit

I installed fresh Windows 8.1 Professional 64-bit. When I copy file to another location, for instance from C:\ drive to external drive I get prompt where I have to click Continue to grant ...
0
votes
1answer
45 views

Enable Logoff Prompt

As a new user to Remote Desktop, I mistakenly told the warning prompt about closing the session that I didn't want to be warned again. Since I can't seem to remember to logoff the CORRECT way, I ...
1
vote
0answers
133 views

Windows 8.1 mark an account as a Trusted UAC Account

From what I understand in windows 8 if you want to use/enable UAC you get a prompt unless you hack an icon or use the local SYSTEM account. I am fine with this, however is there a way to make a ...
1
vote
2answers
46 views

Search-and-go in Windows CMD

I know that for file search on Windows CMD one can use the following command: dir /S /P "PATH/FILENAME" Is there an easy way to go straight to the result directory. For example, the requested file ...
-3
votes
1answer
69 views

Access c:\“ my path ” in windows command prompt

I want to access a path in C drive when I open the command prompt I have c:\user\myname where is I want to access c:\ so that I can access any paht I want in C
2
votes
0answers
206 views

My custom fish shell prompt keeps resetting every reboot

I switched to fish shell a month ago and I'm quite pleased with it. But recently, my custom prompt keeps resetting to the default prompt every time I turn on my PC. When opening the terminal, I'm ...
0
votes
2answers
36 views

Bash prompt coloring not appearing correctly

I had a functioning Bash prompt colored how I wanted it, but after reinstalling the background is gray rather than black like this setting should make it. My PS1 is \[\e[33;40m\]\T ...
0
votes
0answers
20 views

Win 7 - default commands upon starting shell [duplicate]

Is there any way to set "default commands" that would be executed whenever a windows shell (cmd) is opened? E.g. I like to execute "prompt $g && cls" before doing anything else. Can I ...
1
vote
1answer
1k views

Schedule a task with admin privileges without a user prompt in windows 7

In windows 7, I'd like to schedule a program to be run with administrative privileges, without having the user need to respond to a prompt (which requests elevated privileges) every time the scheduled ...
0
votes
0answers
24 views

Set cmd prompt at start of session? [duplicate]

I wanted to modify my cmd prompt on Windows to more closely resemble the prompt I use in Linux and OS X. With some experimentation, I found that entering the following line of code at the start of a ...
1
vote
0answers
232 views

Save PDF automatically on exit in Adobe Reader

Adobe Reader prompts me to save on exit. This is an operation I do several times a day every day, so if I Adobe Reader could just save my changes without asking me (that is, comments), that would be ...
0
votes
0answers
47 views

Bash Prompt : incorrect time displayed

Using the following prompt: export PS1="\n[$(date +%d-%m-%Y)] \u@\h [\t]\n{\w} [\!] # " and with TZ to my timezone : echo $TZ = America/Montreal The time on the prompt is OK at the start of a ...
0
votes
1answer
99 views

What 016 017 in bash prompt, how can I make it correct in Terminal

I saw a beautiful bash prompt here PS1="\n\[\e[30;1m\]\[\016\]l\[\017\](\[\e[34;1m\]\u@\h\[\e[30;1m\])-(\[\e[34;1m\]\j\[\e[30;1m\])-(\[\e[34;1m\]\@ ...
0
votes
0answers
21 views

Customized bash prompt (PS1) issues when text moving to next line and back.(word wrapping) [duplicate]

I'm using a customized prompt which includes and output of a "case" script and also colors it. When the text is colored I'm having line wrapping issues, when I remove the color - the issue is gone. ...
0
votes
2answers
57 views

Making PS1 prompt refreshable

I want my prompt to be changed based on an output of a certain command. and based on the command result to add a color. example: run the command: cphaprob stat | grep local | awk '{ print $NF }'` ...
0
votes
0answers
72 views

how to list all CNAMEs of the current server in the bash prompt?

I have servers with a generic names (e.g. eu1.example.com) which has a set of useful CNAME (e.g. mail.example.com, rocket.example.com). How can I list the CNAME in a bash prompt, to go from ...
0
votes
1answer
132 views

How to change bash prompt?

I'd like to change my bash prompt when I login. But even after I change .bashrc and re-login, it still prompts the old one. What goes wrong please? I want to get [\u@\h \W]\$ but I get \s-\v\$ for ...
0
votes
2answers
130 views

Importance of default starting folder in CMD Prompt

Every time I run the Command Prompt on my machine (Windows 7 Professional, 64bit), the default message tells me on which folder my commands are active, as the CLI has "sent" me there: the ...
3
votes
1answer
71 views

bash's command number ( \# ) equivalent in zsh

I'm looking for a character to put in my zsh's $PROMPT that would be equivalent to bash's \# (the command number of this command, according to this site). So far I've found only %h but this is not ...
0
votes
1answer
799 views

How to configure internet explorer to block download prompt for csv files

How to configure internet explorer to avoid save or cancel prompt while downloading .csv file and download the csv file.
1
vote
0answers
76 views

Update prompt on window change in tmux

Windows in tmux can easily become out of sync. For example, in both windows I might have: ~/dir git:(master *) $ The * indicates changes. Then I run git commit in one window, or change to another ...
-1
votes
1answer
33 views

Need Macro to perform formula based on cell not number

I am working on a budget workbook and in column I (I5-I1135) I have numbers that I need to upon prompt (such as CTRL C) have the numbers divide by 10 then multiply by 12.. Example: cell I5 has ...
0
votes
1answer
77 views

How to create a windows cmd script to rename files

I have a bunch of files named YYYYDDMM_prep888 and I want to rename them to YYYYMMDD_prep888, just exchanging DD for MM. I'd appreciate some help. Thanks.
5
votes
3answers
282 views

On windows commandline, how do I get a dynamic prompt that tells me where in the filesystem I am?

I am trying to modify my CMD, to show only current dir name dynamically like: Desktop $ When i switched the folder, it must be updated. It is not required to be code in purely batch file, it may ...
5
votes
2answers
159 views

Customizing command window prompt

I am running a bunch of commands in a command prompt on a Windows server over a period of time and I would like to see when I last ran a command. I used the prompt command to customize the prompt. ...
1
vote
2answers
42 views

Subdirectories in prompt?

I'm working on making my prompt as useful as possible. Right now, it contains the date, time, and directory, along with a colored divider line so I can easily see where each batch of input starts. I ...
6
votes
3answers
1k views

Removing the useless space at the end of the right prompt of zsh ($RPROMPT)

In zsh, there is always a space character at the right of my right prompt. I tried with a very simple .zshrc such as: PROMPT="#" RPROMPT="*" There is a always a space after the * on the right of ...
0
votes
2answers
108 views

Formatting a disk drive

I need to get to the c prompt before windows 8 loads. I want to reformat my hard drive and reinstall windows 8 because I cannot get it to recognize my password.
2
votes
0answers
148 views

Open in Command line doesn't work anymore since the last windows update

Since the last Windows update (2013/11/12), this doesn't work anymore on Windows 7 64bit: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\cmd] @="Open cmd ...
0
votes
2answers
108 views

iTerm2 & Terminal Giving >> [33[01;32m]u@h[33[00m]:[33[01;36m]w[33[00m]$

I opened iTerm2 and it changed the prompt to.. [33[01;32m]u@h[33[00m]:[33[01;36m]w[33[00m]$ I have no idea how this happened, and I can't figure out how to change it. I went to terminal ...
1
vote
0answers
131 views

How do I display a newline in a mysql prompt?

I'm trying to make my mysql prompt look like this: root@localhost:3306 database $ [mysql commands…] How might I place the dollar sign on a newline? Here's my current prompt configuration, in which ...
-1
votes
1answer
77 views

Save custom Prompt string in command prompt [duplicate]

I've come to like starting all my sessions with a prompt $D$H$H$H$H$H$H$H$H$H $T$H$H$H $P $_ Is there a way to just save it so it does it itself?
2
votes
1answer
112 views

how to open cmd from gvim without waiting the cmd window to be closed

In gvim I can open cmd typying :!cmd, but gvim keeps waiting for the cmd window to be closed. Is there a way to tell gvim NOT to wait?
3
votes
2answers
568 views

How to answer a prompt in a batch file

Per suggestion I added /ad to return only dirs, but continue to get prompted. The prompt suggests it wants to know whether to create a file or directory. How do I automate the answer in a batch ...
0
votes
0answers
69 views

Can I test if command prompt support unicode in Windows

Is there a simple test (or trick) I can run on Windows command line to know if it supports unicode? For the context, I'm using Node.js - but I'm pretty confident I could adapt any solutions.
1
vote
3answers
4k views

How to execute linux command in background?

Currently, I'm using nohup command & to send it in background. But the problem is: if I execute nohup command & I get outout as : root@ubuntu:/home/test# nohup sleep 10 & [2] 52439 ...
0
votes
2answers
108 views

Sending special bash characters to a custom function

I read this great article on customizing the bash prompt: http://blog.superuser.com/2011/09/21/customizing-your-bash-command-prompt/ I also read about using 256 colors in bash: ...