Questions tagged [ps1]

Questions about the BASH shell's PS1 input prompt facility. DO NOT USE this tag for questions about PowerShell scripts, use [powershell] instead.

285 questions
0
votes
1 answer

get-spweb how can i get today created items

I'm using the next Powershell Script to get items from Sharepoint List and export it how can i edit this script to get only today created data or the data entered today This is the code $MyWeb = Get-SPWeb…
0
votes
1 answer

Making the bash prompt smaller

Currently my Windows Git Bash shell prompt looks like this: UserName@ComputerName Path (Branch) When I echo $PS1, I get: \[\033]0;$MSYSTEM:\w\007\]\n\[\033[32m\]\u@\h \[\033[33m\]\w$(__git_ps1)\[\033[0m\]\n$ In my .bashrc file I tried to update…
Laoujin
  • 8,749
  • 6
  • 34
  • 64
0
votes
0 answers

git ps1 is very slow in GNU-Screen

I have my custom PS1 on my virtual machine ( Vagrant / ubuntu-13.10 ), which works perfectly when I ssh to the machine. But when I run GNU-Screen to have multiple screens I loose that, which is normal (as ~/.bash_profile is not being called at…
Majid
  • 2,599
  • 3
  • 13
  • 14
0
votes
1 answer

Console2 not using PS1 colours

I am using Cygwin in Console2 with the following PS1 export PS1='\[\e]2;\w\a\e[1;32m\e[40m\n\w\n\d - \@ > \[\e[0;00m\]' The prompt has the correct text content, but all the colors are ignored. ~/wd Tue Mar 18 - 01:14 PM > Screenshot showing…
Robert Mark Bram
  • 4,924
  • 7
  • 44
  • 65
0
votes
1 answer

Error running ps1 from c# code (Office 365)

When creating the sharepoint site using ps1 file from C# code in office365. This error is coming The 'connect-sposervice' command was found in the module 'Microsoft.Online.SharePoint.PowerShell', but the module could not be loaded. For more…
0
votes
1 answer

Setting ${PWD} in PS1 variable does not work in Korn Shell

I have set the below as my PS1 variable in Solaris 5.10 PS1="\[${USER}@`uname -n` ${PWD}]\$ " When I start my terminal session, it shows the correct directory(i.e my home directory) but when I change to some other directory it actually does not…
0
votes
5 answers

What directory is the default bash directory

I am using the bash console for Ubuntu and my console location is user@MyServer:~$ If user@MyServer:/$ is the root directory, what is user@MyServer:~$ ?
Andrew
  • 1,546
  • 1
  • 15
  • 20
0
votes
1 answer

Linux command line issue with prompt

I started to manage a new server based on CentOS. I wanted to change the prompt, so I wrote the following command : PS1="\e[0;36m[`pwd`]\$\e[m " It worked perfectly. But since I got an annoying issue. When I write something quite long, or displays…
Jeremy Belolo
  • 3,553
  • 3
  • 35
  • 68
0
votes
4 answers

How do I remove this space in this sed regex?

I have a script from a coworker that formats my prompt. It grabs my branch and formats with the code below using sed (note I hardcoded the branch name for testing): echo "* master" | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1 /' In an effort to learn…
Kelly
  • 577
  • 7
  • 16
0
votes
2 answers

how vbscript read the result file generated by powershell script (called by the vbscript itself) ?

I have one vbscript to execute a powershell script. The powershell script simply append the result to a file. Then after the powershell script execution complete and return to vbscript. The vbscript will read content of the file and display it on…
0
votes
1 answer

Powershell Script Capture Cmdlet Result/Errors

I'm writing a small Powershell script (.ps1 file) to allow some of our users to manage active directory users in a very simple interface. The problem is, I'm having trouble capturing the result/output from a cmdlet like New-ADUser to see if it was…
jrble819
  • 119
  • 1
  • 9
0
votes
2 answers

Trimming PS1's working directory path

Is there a way to get my ubuntu command prompt to be something like: user@host:home$ but still have the behavior of: user@host:home$ cd projects user@host:home/projects$ Right now, my working directory path before the home directory is cluttered…
rdav
  • 1
0
votes
3 answers

Unsigned Powershell scripts from HTA

I have created the below batch file and it works flawlessly as long as I run it manually. However, if I run the .bat file from a HTA application, PowerShell says that he can't run the script because it is not signed/not trusted: "File cannot be…
AdrianM
  • 47
  • 1
  • 3
  • 13
0
votes
1 answer

How to generate PS1 in a function (escaping issues)

I'd like to move my bash prompt's construction into a function that can build it up modularly. The problem is that I cannot figure out how to get the function's result to be interpreted. Example: function build_prompt { echo "\@" } export…
Joshua Cheek
  • 26,664
  • 15
  • 67
  • 81
0
votes
1 answer

Running a ps1 through a VBS in background

I'm trying to run a ps1 script that makes a "beep" alert when you lock or unlock your session on windows xp. I already got it and I'm trying to call that script through a VBS script. Problem is that if I execute the VBS manually, the power shell…
1 2 3
18
19