How to pass password to scp?

I know it is not recommended, but is it at all possible to pass the user's password to scp? I'd like to copy a file via scp as part of a batch job and the receiving server does, of course, need a...

How do I use sudo to redirect output to a location I don't have permission to write to?

I've been given sudo access on one of our development RedHat linux boxes, and I seem to find myself quite often needing to redirect output to a location I don't normally have write access to. The...

Redirect stderr and stdout in Bash

I want to redirect both standard output and standard error of a process to a single file. How do I do that in Bash?

How to redirect and append both standard output and standard error to a file with Bash

To redirect standard output to a truncated file in Bash, I know to use: cmd > file.txt To redirect standard output in Bash, appending to a file, I know to use: cmd >> file.txt To redirect both...

The '<' operator is reserved for future use

I am using PowerShell and am trying to run the following command: .\test_cfdp.exe < test.full | tee test.log test.full is a script that mimics command line inputs to test_cfdp.exe. However, I...

How to redirect both stdout and stderr to a file

I am running a bash script that creates a log file for the execution of the command I use the following Command1 >> log_file Command2 >> log_file This only sends the standard output and not the...

PsExec redirecting output and error generated by the command not working

I've a console application which does this class Program { static void Main(string[] args) { Console.WriteLine("out"); Console.Error.WriteLine("err"); Environment.ExitCode = 5; } } When...

Capture stdout and stderr into different variables

Is it possible to store or capture stdout and stderr in different variables, without using a temp file? Right now I do this to get stdout in out and stderr in err when running some_command, but...

Redirection of stdout to a file not working

I have a script that uses subprocesses to fetch HTML: [email protected]:~/git/domain_classifier$ python webkit_retrieve.py error-cut.txt html/error -N 5 http://kurabo.co.jp...

Redirect standard output and prompt for UAC with ProcessStartInfo

I'm working on a WPF application targeting .NET 3.0. I need to call an exe which requires administrative privileges. I can get the UAC to prompt for permission by using something...

Redirect lldb output to file

I'm using lldb inside Xcode, and one of my variables contains a huge chunk of JSON data. Using po myVar isn't much helpful to analyse this data, as it will output in the tiny Xcode debug...

Curious tput behavior, with stderr redirection

I'm trying to use tput in a Bash script, and doing my best to avoid random error spew. To that end, I wrote the following line: COLS="$(tput cols 2> /dev/null)" To my surprise, when I run this,...

Redirecting standard input of console application

I have a console application which I'm trying to automate by redirecting Standard input stream of the process. In manual mode after opening the application, it waits for user input like below, I...

How do I get CUDA's printf to print to an arbitrary stream?

CUDA's printf() in kernels prints to the standard output stream of my process. Now, I want to, at the least, redirect this printout to an arbitrary output stream , from here on. I do mean an...

Install multiple homebrew formulas at the same time

You can install multiple homebrew formulas by brew install package1 package2. But if you have a text file with all the packages that you would like to install. How would you do it? brew install <...

Whats the difference between redirections "1>/dev/null 2>&1" and " 2>&1 1>/dev/null"?

Whats the difference between redirections 1>/dev/null 2>&1 and 2>&1 1>/dev/null It seems 1st one displays output to stdout but not the second one. Can somebody explain ! Thanks

Redirecting console output to file won't work

I'm trying to redirect the output of the following script to a file REM go to the caffe root cd ../../ set BIN=build/x64/Release "%BIN%/caffe.exe" train...

redirect sys.stdout to specific Jupyter Notebook cell

Jupyter==4.1.0, Python==2.7.10, IPython==4.2.0 I'm writing a SQL UI for my Jupyter Notebooks and would like to incorporate multithreading so that I can run a query in one cell and continue to work...

how to use Scrapy to download image that needs cookie

I'm using scrapy to crawl a website this is how I maintain the cookie jar after login def start_requests(self): return [scrapy.Request("https://www.address.com", meta = {'cookiejar' : 1},...

git fetch --quiet is writing to stdout instead of bieng silent

git fetch --quiet &>/dev/null & is still writing to stdout asking for the username. Is there any workaround to archive this. Edit: Adding details I have a custom script to display git...

C++ ignore alphabetical characters when reading input from a file

I have a program that takes an input stream from a text file, which contains positive integers, delimited by spaces. The file contains only numbers and one instance of abc which my program should...

exec git command refuses to redirected to file in Go

I am trying to invoke a git log from go and redirect the output to a given file. cmdArgs = []string{"log", "--numstat", "--reverse", fmt.Sprintf("%s..HEAD",...

Check login credentials of remote website with Angular

I'm creating an interface for hackers news with angular 7. Normally I use the public APIs available, but for login services they are not available. I'm trying to make a POST call, as done by an...

Invoke-Expression, not all output returned to variable

I'm using some GIT commands in my PowerShell scripts. Most of the time I'm calling the GIT commands via Invoke-Expression so that I, e.g. can parse the output, or/and forward the out to a logging...

Can't redirect all homebrew cask outdated output?

I was writing a script to identify which outdated casks to upgrade, since brew cask upgrade doesn't upgrade all casks with a numbered version, and brew cask upgrade --greedy also upgrades those...

how to create a aiogram button that can redirect you?

So, im trying to create a button that will redirect me to one of my other bots. Not really sure how to do that. for now, this is the sample, this does add the button, but it just echos, instead of...

Redirect shell script stderr to syslog

I often see that both stdout and stderr are piped to the syslog. However, it is then no longer possible to distinguish in syslog whether it was an error or not. Message severity is always info (or...

How to run batch files in background while running multiple files in parallel

I am writing a batch file which will execute 4 other batch files in parallel: @echo off echo %time% ( start call s1.bat start call s2.bat start call s3.bat start call s4.bat ) |...

C stdio redirection to and from child process

I have a CLI program which read command lines from stdin and write the output to stdout. From what I understand, when I launch this program from a terminal, it become a child process of that...

How do I use raku -e and -n with multiple file glob

I'd like to do the following in raku on windows raku -n -e ".say if /mydatabegin/;" *.file Failed to open file C:\..\*.file: Invalid argument The glob isn't interpreted as a glob. I assume...