Currently, I am in the process of creating a Powershell script to expedite setting up my development environment. My goal is to have multiple instances of WSL programs running on bash terminals. My objectives from within Powershell are as follows: Open a ...
Recently, I've delved into using npm (https://www.npmjs.com) and it's impressive how versatile it is as a build tool. However, as I explored further, I began to question its uniqueness. When you think about it, npm operates similar to a shell program (suc ...
Attempting to set up a variable with a JSON value in Airflow using the web API. Here is my script: curl -X POST "${AIRFLOW_URL}/api/v1/variables" -H "Content-Type: application/json" --user "${AIRFLOW_USERNAME}:${AIRFLOW_PASSWORD}" ...
I need help removing extra quotation marks from the following JSON data: {""id"":""1"", ""name"":""john"",""address"":"",""timestamp"":""2018/01/01 12:43:42 -700"",""dept"":""} To address this issue, I have been using the sed command: sed -i -e 's/ ...
Hey there, I've been attempting to deploy to Digital Ocean using a Gitlab CI/CD pipeline. However, every time I run the pipeline, I encounter the following error message: "chmod: /root/.ssh/id_rsa: No such file or directory $ chmod og= ~/.ssh/id_rsa C ...
Trying to execute a shell script in my Angular application has been quite the challenge. I came across the "child process" node library that might be able to help me with this task. However, every attempt to import the library led me to the error message: ...
Is there a solution for displaying a Linux shell output on a web page that allows for continuous updating without needing to start and stop the process each time? I require a network analyzer tool based on a shell that can run continuously, similar to comm ...
I am working with a Pipfile.lock JSON file that requires parsing using the jq tool. The format of the file is as follows: { //... "default": { "value1": { // numerous nested properties with values ...
I'm in need of modifying certain values within JSON data and integrating it into an existing shell script. My aim is to utilize jq for this task, specifically the "sub()" function to trim a portion of a string value. Executing the following command line: ...
When I attempt to run a Python script using the python-shell package in Node.js, I encounter a SyntaxError: invalid syntax. Node.js code const options = { mode: 'text', pythonPath: '/usr/bin/python3', scriptPath: __dirname + '/script', }; var ...
I'm just starting out with Python and I have a text file that contains some definitions like the following: .subckt inv a z mp z a vdd vdd pch mn z a gnd gnd nch .ends .subckt pg in out clk clkb mp in clkb out vdd pch mn in clk out gnd nch .ends .s ...
I've been looking to save some shell scripts into a file for collection by an agent like Fluentbit and sending them off to Cloudwatch and Datadog. I came across this example online that works effectively with the use of jq. __timestamp(){ date "+%Y ...
Hey there! I've been working on some scripts to customize my shell environment, and everything is going great except for nvm. Here's a snippet from my script: #!/bin/zsh set -Eeuo pipefail echo 'Installing nvm' touch $HOME/.zshrc curl -o- https://raw.git ...
Despite being able to successfully run a python script, I am facing challenges when it comes to saving a file using the script. While running the python script directly from the terminal yields positive results, spawning a node process seems to fail withou ...
I am seeking to update a specific portion of a file with the following structure: { "Section_A": { "ws/abc-Location01": 24, "ws/abc-Location02": 67, "ws/abc-Location03: 101, }, "Section_B": { "ws/abc-Location01": 33, "ws/ab ...
I am faced with a challenge of automatically compiling an .Au3 script code and then running it. The script (au3 file) is updated automatically, but in order for the updates to take effect when I run the script, it needs to be compiled first. While there ar ...
Struggling to set up typescript using the command npm install -g typescript, I encountered the following error message: npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! at Error (native) npm ERR! { Error: ...
I am completely new to shell scripting and have been scouring the internet for guidance on how to create a backup script for my website. Unfortunately, I haven't been able to find anything that I can understand. I have a Synology Diskstation server a ...
After creating some JSON data and passing it to another Python script, I realized that the double quotes around the JSON elements are missing. Here is a snippet of my code: json = @report.resultReportToJSON(result_type, result, unit) puts "#{json}" `"pyth ...
Is it feasible to execute 3 or more nodeJS Applications using a single command through a shell script? The concept involves having a shell script that navigates into the app directories and runs the npm command. Using the npm package concurrently is not ...
I wrote a python script that takes a .txt file as input and produces another .txt file as output. My goal is to create a bash script that I can simply click on from my desktop to run the python script. This is what I have done so far: #!/bin/bash cd /Des ...
I am in possession of a Stiebel Eltron heat pump device for my home and I am seeking to utilize Linux shell curl (not php) to login via POST request and retrieve data through a GET request once logged in Here is the structure of my curl login POST call (I ...
I'm attempting to run the following commands in parallel using &: ENV=prod npm run SettingsSuite -- --runid Prod_E2E_$BUILD_NUMBER --APPNAME Prod_E2E --squad ops --track coreServices; echo $? >> "$log_file" & ENV=prod npm run InventorySuite -- ...
When I try to run a PHP script connecting from my local Ubuntu Linux machine to an EC2 instance using SSH, it executes fine when run from the terminal and writes the tailed entries in a file. However, when I try to run it from a browser, I encounter the fo ...
Currently, I am executing a script on my server and attempting to retrieve some files from my Firewall. However, when I use an environment variable (signified by the $ symbol) to reference the file, I encounter a "file not found" error. Surprisingly, I hav ...
I run a website for sharing images and videos, but I'm concerned about its security. I've noticed that anyone can upload harmful shells or malware instead of legitimate content. I'm curious how YouTube and Facebook are able to prevent such vulnerabilitie ...
I am currently utilizing Devstack in my development setup. When it comes to adding specific configuration settings in the nova.conf file, one can employ the following code snippet: [[post-config|$NOVA_CONF]] [DEFAULT] notification_driver=messagingv2 noti ...
My dilemma lies in handling the JSON output I have, which contains a list of objects stored within a variable (I hope I expressed that correctly). I've tried executing a curl command to obtain the output, but unfortunately, I'm unable to share i ...
When attempting to run a CURL statement, I successfully received the desired response: curl -s -POST --header 'Content-Type: application/json' 'http://www.dummy.com/projectname/page_relevance' -d '{"query": "q_string", "results": [{"abstract": "abs_string ...
Can parameters be passed from php to a shell script? For example: <?php $var = "testfolder"; shell_exec('sh /path/test.sh $var'); ?> Shell script (test.sh): sudo mkdir $1 /path/ I want the value in php $var to be passed to the shell ...
Looking to enhance a virtual machine through the console, I am new to Python and have experience with shell but wish to use a Python script for this task. I know about using subprocess or os.system commands, but find it challenging to convert the shell sc ...
I have a collection of approximately 100 JSON files, each containing an array with 100 simple records that I want to merge into a single file to use as static data in an application. This will help me avoid making multiple API calls to retrieve small piece ...
Currently, I am facing a challenge where I need to execute shell commands on our remote servers using PHP. The main goal is to install scripts through bash by having PHP execute these scripts on the server remotely. However, I have encountered an issue wh ...
I have been developing a tool that is designed to execute a series of commands. These commands are written as if they were being entered into a terminal or console. In order to achieve this, I have utilized Popen() with the parameter shell=True to replica ...
Within an HTML snippet, I currently have a <title> tag that I need to change on a monthly basis when generating reports. While I can manually update it each month, I am looking for a way to automate this process so the title reflects the relevant rep ...
I have encountered an issue while trying to use openpyxl from a script. When I use openpyxl from an IDLE shell, everything works smoothly: Python 2.7.9 |Anaconda 2.2.0 (32-bit)| (default, Dec 18 2014, 17:00:07) [MSC v.1500 32 bit (Intel)] on win32 Typ ...
The JSON file is located at %Workspace%\solution\config\appsettings.json { "appName": "Test", "appId": "1", "env" : "Test", "url" : "https://url.com", "client_id": "", "client_secret": "", "QAEmail" : "<a href="/cdn-cgi/l/email-protecti ...
I am encountering an issue while trying to utilize a npm package called timestamp notes. After executing the following commands: $npm install timestampnotes $timestamp I receive the error message: timestamp:126: command not found: slk Subsequently, I ...
After spending several days working on this project, I am struggling to understand why the winning or losing message is not being displayed. The project involves a simple shell game created using HTML, JavaScript, and CSS. I have tried reworking the JavaSc ...
Is there a way to incorporate Python code directly into a shell script without relying on an external file? I've done extensive research, but I couldn't find a clear answer. Most solutions involve running an external Python script from the shell ...
Similar Question: Parsing JSON using Sed and Awk I have an example of a JSON string provided below. I am interested in extracting the value of the "uptime" field to use as a variable in a shell script. How can I achieve this? { "serverStatus" : { " ...
After parsing through my json data, I've come across the following structure: { "Items": [ { "id": { "S": "c921e4eb-5958-424a-ae3a-b9cada0d9481" }, &quo ...
What am I trying to accomplish? I have a JSON file called sonar-report.json. My goal is to iterate through the sonar-report.json in a shell script and extract values from the JSON file. To achieve this, I am using jq as my JSON parser (). Below is the cod ...
For my nuxt project, I decided to use json-server as the local server. My goal is to automate the process of launching the server and running the project on a separate shell instance by using the command "npm run dev". After some exploration, this is the ...
Is there a way for Python to create paths with multiple sub-paths using shortcut syntax similar to this? vars=project/{DEBIAN,usr/{bin,usr/{applications,icons,share}},computer} ...
My client is requesting the dependencies of our projects, including the library name and github/NPM URL. Currently, I am using 'npm ll' command to retrieve this information for each project, but the output is in a tree structure. Is there a way to convert ...
I am currently dealing with updating and displaying real-time information from a third-party JSON file that is approximately 1MB in size. The challenge lies in the fact that this JSON file updates constantly, and my access key may be revoked if users direc ...
On a recent visit to JetBrains, the recommendation was to enable the Terminal plugin in Pycharm. However, I am unable to locate it anywhere within my application. This has become quite problematic as I urgently need access to the Terminal for an ongoing ...
The title of this question is pretty self-explanatory, but I'll provide some more details. There's a PHP file named hello-world.php and a bash script named testBash.sh in my setup. Inside hello-world.php, there are two methods: helloWorld() and ...
Trying to retrieve a list of todos based on the 'userId' associated with each one is proving difficult. The code below does not return any rows: DB.TodoTable.find({ "userId" : ObjectId("54c12f5f3620c07019e6b144") }, function(err, todos) { if (err) ret ...
My current project involves finding a method to remotely reboot a dedicated server using php. During my search on various platforms, I came across information about Python shell client. Is there an equivalent in php? Would it be possible to utilize php fo ...
I am facing an issue where I am attempting to pass a command line option (which is not stored in version control) to my main script index.js. This script performs specific actions based on a designated S3 bucket. Here is the relevant section from my packa ...
Today, I encountered an issue while trying to run a Python script: python ./helloworld.py -bash: python: command not found Despite having Python installed on my computer: whereis python python: /usr/bin/python3.6 /usr/bin/python3.6m /usr/lib/python3.6 / ...
At first, our objective is to transfer modifications from one system to another using a shell script named synchfolders.sh. The content of the file is as follows: rsync -av --delete -e 'sshpass -p Wordpress@123 ssh -p 22' <a href="/cdn-cgi/l/ ...
Brand new to ".sh" right now when faced with this question. I am not even certain what ".sh" refers to - Shell, Powershell, Bourne shell, etc. Currently, I am operating from a Windows OS. The goal of this question is: Change directories Run the npm scrip ...
I have encountered an issue with a php script that generates a shell script file which is executed as the user www-data. Most of the commands in the script run without any problems, but the last command involving a binary file fails to execute when the scr ...
I'm trying to retrieve the browser download URL for the latest release from a specific Git repository using the GitHub API. Sample command: curl -i https://api.github.com/repos/$owner/$repo/releases The response is in the form of a JSON array. Assuming ...
My Python script serves to convert user IRC commands such as "/nick hello" or "/quit" into IRC protocol messages efficiently. It performs this conversion by taking input line by line from stdin and then producing the translated message on stdout. I also ha ...
Currently utilizing a JavaScript library that uses a JSON file to display content on the screen in an interactive manner. (::Using D3JS Library) While working with clients, it is easy to delete, edit, and create nodes which are then updated in the JSON fi ...
I am looking to develop and release a script on npm that functions similarly to: npm create qwik@latest or yarn create next-app --typescript However, I am unsure where to begin. Despite searching extensively online, I have not been able to find any helpf ...
I am currently working on a shell script that updates specific values within a JSON array, which is stored in a separate file. The basic logic behind this script involves setting an environment variable called URL, pinging that URL, and then modifying the ...
My goal is to include this block of code from the devices_format.json file: { "devices": [ { "name": "new_elsys", "objects": [ { "name": "ServerRoomTemp", "datapoint_type": "measurement", "coder_fiel ...
Is there a way to view the output of a shell script in a format similar to PuTTy or gnome-terminal using a php script? I attempted to use shell_exec with the following invocation: $output = shell_exec('echo "return value: ";foo=$(nameOfFileToExecute) ...
When I enter the following command into bash, it opens a new shell and launches nano: gnome-terminal -e "bash -c 'nano test; bash'" I attempted to replicate this in my Python code using subprocess: import subprocess command = "gnome-terminal" ...