console-output

Search through console output of a Jenkins job

拜拜、爱过 提交于 2019-12-04 00:47:42
I have a Jenkins job with 100+ builds. I need to search through all the builds of that job to find builds that have a certain string in the console output. Is there any plugin for that? How do I do that? I often use the Jenkins Script Console for tasks like this. The Groovy plugin provides the Script Console, but if you're going to use the Script Console for periodic maintenance, you'll also want the Scriptler plugin which allows you to manage the scripts that you run. From Manage Jenkins -> Script Console , you can write a groovy script that iterates through the job's builds looking for the

How can i print a triangle with “*”s using for loop in java?

[亡魂溺海] 提交于 2019-12-02 22:47:28
问题 I want to draw a triangle with stars like below using for loop, but i really don't have any idea of how to do this ? Triangle is going to be like this: * ** *** **** ***** ****** ******* ******** ********* ********** and so on. Can anybody please help me ? public class Project1 { public static void main (String[] args){ int c, d, e; for (c = 1 ; c <= 8 ; c++){ for (d = 1 ; d <= c ; d++){ System.out.print ("*"); } System.out.println(""); } for (e = 1 ; e <= 4 ; e++){ System.out.println ("***")

Different results in Java and C++ using += in recursion

为君一笑 提交于 2019-11-30 20:45:38
The very simple Java code as follows has the weird output, but the same logic code in C and C++ has the right output. I try with the JDK 1.7 and JDK 1.3 (relative JRE), the weird output is always there. public class Test { public static int sum=0; public static int fun(int n) { if (n == 1) return 1; else sum += fun(n - 1); // this statement leads to weird output // { // the following block has right output // int tmp = fun(n - 1); // sum += tmp; // } return sum; } public static void main(String[] arg) { System.out.print(fun(5)); } } The output is 1 which should be 8. Relative C/C++ code is as

Formatting console Output

我的未来我决定 提交于 2019-11-29 03:56:39
I'm having trouble making python print out texts properly aligned. I have tried everything I knew, but still the same result and it's very annoying!. Here is what I'm getting in the console Here is the Code I have. print " FileName\t\t\t\t\tStatus\t\tBinary Type\n" for files in PASS: log = subprocess.check_output(['dumpbin','/HEADERS',files]) if arch64 in log: print" %s \t\t\t\tPASSED\t\t 64-bit \t\t " %files elif arch32 in log: print" %s \t\t\t\tPASSED\t\t 32-bit \t\t " %files print"\n" for files in FAILED: print" %s \t\t\t\t FAILED \t\t " %files print "\n\n Use %45s to make a right justified

Get terminal output after a command swift

倖福魔咒の 提交于 2019-11-27 01:21:53
I run some commands in terminal with this code: system("the command here") And after I want to know what is the result of running this command, e.g. if I run system("git status") I want to read the actual information about changes in my repo. Is there any way to do that in swift? Martin R NSTask is class to run another program as a subprocess. You can capture the program's output, error output, exit status and much more. Expanding on my answer to xcode 6 swift system() command , here is a simple utility function to run a command synchronously, and return the output, error output and exit code

Get terminal output after a command swift

拟墨画扇 提交于 2019-11-26 08:19:50
问题 I run some commands in terminal with this code: system(\"the command here\") And after I want to know what is the result of running this command, e.g. if I run system(\"git status\") I want to read the actual information about changes in my repo. Is there any way to do that in swift? 回答1: NSTask is class to run another program as a subprocess. You can capture the program's output, error output, exit status and much more. Expanding on my answer to xcode 6 swift system() command, here is a

How do I write output in same place on the console?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 06:07:35
I am new to python and am writing some scripts to automate downloading files from FTP servers, etc. I want to show the progress of the download, but I want it to stay in the same position, such as: output: Downloading File FooFile.txt [47%] I'm trying to avoid something like this: Downloading File FooFile.txt [47%] Downloading File FooFile.txt [48%] Downloading File FooFile.txt [49%] How should I go about doing this? Duplicate : How can I print over the current line in a command line application? codelogic You can also use the carriage return: sys.stdout.write("Download progress: %d%% \r" %

How do I write output in same place on the console?

梦想与她 提交于 2019-11-26 03:26:06
问题 I am new to python and am writing some scripts to automate downloading files from FTP servers, etc. I want to show the progress of the download, but I want it to stay in the same position, such as: output: Downloading File FooFile.txt [47%] I\'m trying to avoid something like this: Downloading File FooFile.txt [47%] Downloading File FooFile.txt [48%] Downloading File FooFile.txt [49%] How should I go about doing this? Duplicate : How can I print over the current line in a command line