command-line-interface

Jenkins CLI List-Jobs with folders

两盒软妹~` 提交于 2020-08-23 05:05:06
问题 While using the Jenkins Folders Plugin, is there a way to get a list of all jobs (including jobs in folders and possible the folder path) simular to how list-jobs in the default CLI works? I have made a small PowerShell script to get info for the last build of every job in the default dashboard and export relevant info to excel. But now we started using folders, and it doesnt work for folders and the jobs in them. My old import code: java -jar jenkins-cli.jar -s http://localhost:8080 list

Start a Windows service from a batch script and take appropriate action based on result

送分小仙女□ 提交于 2020-08-10 13:56:26
问题 I have a .bat script that attempts to start a Windows service at the end. :start_wildfly echo. set /p wildfly_service_name="Enter Wildfly service name: " echo INFO: Starting %wildfly_service_name%... echo. call net start "%wildfly_service_name%" I want to be able to interpret the result of the net start attempt so that I can have my script take the appropriate action if it fails (e.g. if the service is already running, restart it. If the service name is invalid, re-prompt for the name again,

Start a Windows service from a batch script and take appropriate action based on result

两盒软妹~` 提交于 2020-08-10 13:56:23
问题 I have a .bat script that attempts to start a Windows service at the end. :start_wildfly echo. set /p wildfly_service_name="Enter Wildfly service name: " echo INFO: Starting %wildfly_service_name%... echo. call net start "%wildfly_service_name%" I want to be able to interpret the result of the net start attempt so that I can have my script take the appropriate action if it fails (e.g. if the service is already running, restart it. If the service name is invalid, re-prompt for the name again,

Error (InvalidChangeBatch) in adding multiple DNS Records from aws command line

╄→尐↘猪︶ㄣ 提交于 2020-08-10 05:01:10
问题 I am trying to add multiple DNS records using this script add_multipleDNSrecord.sh and i am getting this error A client error (InvalidChangeBatch) occurred when calling the ChangeResourceRecordSets operation: FATAL problem: UnsupportedCharacter (Value contains unsupported characters) encountered with ' ' But i am able to add single record without any issue from aws cli. can anyone please tell me what went wrong in this script? #!/bin/bash # declare STRING variable STRING="Hello World" #print

Postgres - update command from CLI

你说的曾经没有我的故事 提交于 2020-08-08 07:17:09
问题 I need to create script in linux. There is command like: psql -U postgres -d ticketon -c "UPDATE "user" SET "password" = 'test'" When I put it to quotation marks, there is mistake. When out of quotation marks, there also is error. I have tried almost everything, but still without success. Do anyone know what is correct syntax? 回答1: How a_horse_with_no_name said. psql -U postgres -d dbName -c "UPDATE \"user\" SET \"password\" = 'test'" 回答2: I was doing something similar recently. What you want

How to filter directories in Midnight Commander

送分小仙女□ 提交于 2020-08-07 06:36:12
问题 Maybe a stupid question, but how can I filter directories in Midnight Commander? For example I have a folder with a lot of directories in it with the following naming: holidays (2016) birthdays (2016) holidays (2015) ... How can I filter like *2015* on directory tier? 回答1: You can press ctrl+s and type *2015* ; or if you want to search all directories by some given criteria, you can press alt+? (esc+? on Mac) and you will see search dialog: at 'Start at' put path to the folder where you would

What can I do about “WMIC is deprecated”?

本小妞迷上赌 提交于 2020-08-04 04:04:08
问题 I've been relying on these two commands: wmic memorychip get capacity // Outputs how much RAM there is (in a convoluted manner). wmic diskdrive get Status,Model // Checks whether the HDDs/SSDs on the system are (supposedly) still "OK" and working. Today, I casually typed "wmic" to see if I could get JSON output to the above commands. The first thing it printed, in red text, was this: WMIC is deprecated. I was pretty shocked by this. It's deprecated? Alright... Then I definitely should not be

What can I do about “WMIC is deprecated”?

南楼画角 提交于 2020-08-04 04:03:10
问题 I've been relying on these two commands: wmic memorychip get capacity // Outputs how much RAM there is (in a convoluted manner). wmic diskdrive get Status,Model // Checks whether the HDDs/SSDs on the system are (supposedly) still "OK" and working. Today, I casually typed "wmic" to see if I could get JSON output to the above commands. The first thing it printed, in red text, was this: WMIC is deprecated. I was pretty shocked by this. It's deprecated? Alright... Then I definitely should not be

What can I do about “WMIC is deprecated”?

試著忘記壹切 提交于 2020-08-04 04:02:33
问题 I've been relying on these two commands: wmic memorychip get capacity // Outputs how much RAM there is (in a convoluted manner). wmic diskdrive get Status,Model // Checks whether the HDDs/SSDs on the system are (supposedly) still "OK" and working. Today, I casually typed "wmic" to see if I could get JSON output to the above commands. The first thing it printed, in red text, was this: WMIC is deprecated. I was pretty shocked by this. It's deprecated? Alright... Then I definitely should not be

shell script relative position from the file

余生长醉 提交于 2020-07-22 06:06:11
问题 I have almost no idea about shell scripts or commands in linux I have a project named projectx projectX happens to be in users/hardik/desktop/projectx I have created a shell script start.sh . This is the content of shell script echo "Starting typescript build in new terminal.." osascript -e 'tell application "Terminal" to do script "npm run build"' sleep 3 echo "Starting firebase functions...." osascript -e 'tell application "Terminal" to do script "firebase emulators:start --only functions"'