non-interactive

bash storing the output of set -x to log file

两盒软妹~` 提交于 2019-12-04 07:31:18
I have a simple download script and I use set -x which works great; I can see each step it performs, and I can identify errors in the script or in the download: #!/bin/bash set -x #short_date=$(/bin/date +%m%d%y) short_date=$(/bin/date -d "8 day ago" +%m%d%y) #long_date=$(/bin/date +%Y%m%d) long_date=$(/bin/date -d "8 day ago" +%Y%m%d) scp -v -P 1332 -i /home/casper/.ssh/id_rsa_BANK friendly@192.168.1.10:/home/friendly/transfer/out/EXCHANGE_$short_date.csv /local/casper3/dailymetrics/BANK_$long_date.csv I would like to automate this job. Is there a way I could save the set -x output to a log

How to force ffmpeg into non-interactive mode?

偶尔善良 提交于 2019-11-30 00:45:08
问题 Sometimes you want ffmpeg to ask you whether it should overwrite a file. Sometimes it's just a script that you prefer would fail if something is amiss. I.e. don't rely on stdin to answer if you have a question. 回答1: See https://ffmpeg.org/ffmpeg.html#Main-options -stdin - Enable interaction on standard input. On by default unless a pipe is detected. -nostdin - To explicitly disable console interactions. Without -y this will cause ffmpeg to error out if the target file exists. -y - To

Why aliases in a non-interactive Bash shell do not work

旧巷老猫 提交于 2019-11-27 00:55:48
I am trying to use aliases in a non-interactive bash shell. I have defined my aliases in ~/.bashrc and I have set the variable BASH_ENV=~/startUpFile . The contents of the startUpFile are source ~/.bashrc . I can see that my aliases are recognized, when I execute the alias command. However, if I try to use an alias defined in ~/.bashrc , Bash can't recognized it. It gives me the unknown command error. With the TCSH shell it is pretty easy to do this because the ~/.cshrc file is always read. Any ideas how I can do this with a Bash shell? The command shopt -s expand_aliases will allow alias

How do I run git rebase --interactive in non-interactive manner?

*爱你&永不变心* 提交于 2019-11-26 17:26:36
Is it possible to do following? Make git rebase --interactive to just output standard boilerplate to a file, instead to outputting to a file and opening it in editor. Let the user edit the file. Let user re-run git rebase with the name of edited file. Go on with the usual rebase process. Usecase: scripted rebasing of course. See how to re-order commits in Git non-interactively for example. After some thinking and research, the answer turned out to be trivial: git rebase -i takes the editor name from the well-known EDITOR/VISUAL environment variables, so overriding that to point to a non

Why aliases in a non-interactive Bash shell do not work

三世轮回 提交于 2019-11-26 09:28:23
问题 I am trying to use aliases in a non-interactive bash shell. I have defined my aliases in ~/.bashrc and I have set the variable BASH_ENV=~/startUpFile . The contents of the startUpFile are source ~/.bashrc . I can see that my aliases are recognized, when I execute the alias command. However, if I try to use an alias defined in ~/.bashrc , Bash can\'t recognized it. It gives me the unknown command error. With the TCSH shell it is pretty easy to do this because the ~/.cshrc file is always read.

How do I run git rebase --interactive in non-interactive manner?

杀马特。学长 韩版系。学妹 提交于 2019-11-26 05:25:05
问题 Is it possible to do following? Make git rebase --interactive to just output standard boilerplate to a file, instead to outputting to a file and opening it in editor. Let the user edit the file. Let user re-run git rebase with the name of edited file. Go on with the usual rebase process. Usecase: scripted rebasing of course. See how to re-order commits in Git non-interactively for example. 回答1: After some thinking and research, the answer turned out to be trivial: git rebase -i takes the