Powershell possible to give input to underlying script

I am sorry I could not think of a better title. My problem is I have a PowerShell script which calls a git command (git credential-wincred store) to store credentials to connect to a git repository. When executing this command (git credential-wincred store) from a powershell script, it will give the user the possibility to … Read more

Apple Script: cannot call id3tag from script with “do shell script”

Trying to rename mp3s from an apple script which will be part of a larger script including Audio Hijacker. set folder_p to “/Users/me/Music/” set folder_path to POSIX path of folder_p set file_path to (“\”” & folder_path & “one.mp3” & “\””) do shell script (” id3tag ” & ” -AHEROR” & file_path) The last command yields … Read more

How to overwrite an echo/printf line with another one? (Making it start at the center of the screen)

I want to write a script which outputs sentences I choose. I want them to appear in the center of the screen: output the first one, and then make the second one appear over the first. Here’s my code: COLUMNS=$(tput cols) printf “%*s\n” $((($COLUMNS)/2)) “Hey, welcome to my script!” “%\r” sleep 2 printf “%*s” $((($COLUMNS)/2)) … Read more

Modifying script to capture login/shutdown times in Windows

For some time now I’ve been using this script to view my login time for a particular computer: Set objFSO = CreateObject(“Scripting.FileSystemObject”) Set objFile = objFSO.GetFile(“C:\Windows\setupact.log”) Wscript.Echo “Log on today at ” & FormatDateTime(objFile.DateLastModified,vbShortTime) This is a Windows 7 Enterprise edition computer with Service Pack 1 installed. It is connected to a domain, and I … Read more

Errors in script which runs on boot

I have made an installer script of my architecture which runs on boot, and I added it to chkconfig: #!/bin/bash # # chkconfig: 2345 99 30 # description: Product Installer Service # if [ -f /home/installer.sh ]; then sleep 60 bash /home/installer.sh > /root/.productlog 2>/root/.productlog rm -f /home/installer.sh fi When I run installer.sh manually it … Read more

ubuntu 12.04 nmcli doesn’t list connections under one no-login user

I am running bacula as my backup system and I would like to run a script before some backup jobs to establish a VPN connection and access some servers that don’t have public IPs. I have configured a PPTP VPN that I can start successfully with the command nmcli con up uuid xxxxxxxxxxxxxxxxxx bacula is … Read more