terminal

How do I run two commands in Windows CMD?

﹥>﹥吖頭↗ 提交于 2021-01-29 09:00:00
问题 I have two commands in that I need to run on CMD.I want to make a bash file so that I can run commands in one click.And I want to wait some time for executing 1st one completely sudo docker run -d --link selenium-hub:hub selenium/node-chrome sudo docker run -d --link selenium-hub:hub selenium/node-firefox 回答1: You can do this with "&&" you could put this in a "script.bat": sudo docker run -d --link selenium-hub:hub selenium/node-chrome && sudo docker run -d --link selenium-hub:hub selenium

Issue reinstalling yarn - code: 'MODULE_NOT_FOUND'

天大地大妈咪最大 提交于 2021-01-29 08:20:41
问题 Node.js Version :14.0.0 OS : MacOS 10.15.4 Scope (install, code, runtime, meta, other?) : Yarn install Module (and version) (if relevant) : internal/modules/cjs/loader.js Upon running any Yarn command, I get the following error. This is after reinstalling and following this sequence of commands: YARN UNINSTALL: yarn cache clean open terminal rm -rf node_modules yarn.lock yarn-error.log package-lock.json brew uninstall --force yarn npm uninstall -g yarn yarn -v which yarn rm -rf ~/.yarn

How can I extract only the name field from json by using gcloud command?

ぃ、小莉子 提交于 2021-01-29 06:04:51
问题 I am new to gcp and linux. I am trying to get the name from the json format using the gcloud command. Below is the command and output: gcloud firestore indexes composite list --format=json Output: [ { "fields": [ { "fieldPath": "is_active", "order": "ASCENDING" }, { "fieldPath": "created_at", "order": "DESCENDING" }, { "fieldPath": "__name__", "order": "ASCENDING" } ], "name": "projects/emc-ema-simcs-d-286404/databases/(default)/collectionGroups/customer/indexes/CICAgNjbhowK", "queryScope":

How can I fix my expect script for scp download?

左心房为你撑大大i 提交于 2021-01-29 05:42:55
问题 I am trying to use expect to bypass the password authentication process for a remote server I'm using, so I can download a series of files in bulk, each of which is stored in a different folder. The reason for using expect is the remote files are stored in separate folders, and the server I'm accessing won't allow me ssh key access. At present I am struggling to download a single file using expect, never mind numerous ones at once. Below is my simple script: #!/bin/bash #connect to the server

Giving a specific position to cursor in terminal (up-line) after previous line breaks

拟墨画扇 提交于 2021-01-29 05:42:01
问题 I am working on a script to show in the terminal an empty matrix with dot representing all the elements to be filled. Then, I want to ask to the user which element he wants to select for each position. I had some issues that I couldn't solve with the code given by the professor: Printing string elements on terminal at certain position. I have found another way by writting the following code: for y in range(0, nbLines): for x in range(0, nbColumns): print("{0}\t".replace('\t', ' ' * 5).format(

Trouble Installing Ruby 1.9.3 on Mac OSX 10.9.4

梦想的初衷 提交于 2021-01-29 04:43:30
问题 I am fairly amateur when it comes to Terminal and command line therefore I thought I might pose my question here and hopefully one of the many intelligent folks roaming this board would be so kind as to help me understand what I am doing wrong here. I am trying to install 1.9.3 on my Mac for a project on Team Treehouse. I already have 2.0.0 installed. Any help would be great. Thank you. Here is the read out from the log. roberts-imac:~ Jones$ rvm install 1.9.3 Searching for binary rubies,

Run android emulator using command line

北城余情 提交于 2021-01-28 22:28:55
问题 I am running latest version of Mac OS and I want to run android emulator through command line tool. I have run the following command on Mac terminal and got the following error. $ emulator -list-avds Pixel_XL_API_28 $ emulator -avd Pixel_XL_API_28 PANIC: Missing emulator engine program for 'x86' CPU. I also run the command with available options like below that is also available on official documentation developer.android.com $ /Users/janedoe/Library/Android/sdk/emulator/emulator -avd Pixel

applescript do shell command “command not found”

安稳与你 提交于 2021-01-28 12:10:12
问题 I am new to applescript and command line tools. I installed a command line tool to control the brightness of the iMac in Terminal. I installed the following: https://github.com/nriley/brightness After installing, I noticed a new exec file in /usr/local/bin/ called "brightness". The Internet told me, that applescript only knows the command lines found in /bin/sh. "brightness" is not found there, and I can't copy the exec file to this directory. So it makes sense, that I get the error "sh:

exit from STDIN from bash script when the user want to close it

有些话、适合烂在心里 提交于 2021-01-28 07:47:55
问题 I'm automating the file creation from a bash script. I generated a file rc_notes.txt which has commit messages from two tags and want to re-write that in a new file as rc_device.txt . I want the user to write the customer release notes and exit from the BASH STDIN that I prompt in the terminal. The problem in my script is I'm not able to trap the close of file. Wondering how to do. I don't want to trap the close signal. I want to enter magic string example: Done or some string that triggers