Questions tagged [unix]

Attention: Only Unix inquiries concerning programming will be accepted; any unrelated questions will be dismissed. Utilize this tag exclusively for queries that pertain to utilizing Unix APIs or Unix-specific functions, not simply due to the fact that you are running your code on Unix. For general software concerns, please refer to Unix & Linux Newtab Q&A or Newtab Q&A.

Output various strings to the standard output and stream them individually

Is there a way to redirect each string output to standard out to another command? // Example file: example.js #!/usr/bin/env node process.stdout.write('foo') process.stdout.write('bar') After running ./example.js | wc -m, the total character count of bot ...

Error connecting to unix:///var/run/docker.sock from PHP due to permission denial

Currently, I am utilizing Docker Windows Toolbox. The docker container was set up using PHP-FPM: docker run -d -v /var/run/docker.sock:/var/run/docker.sock php:7.0-fpm-alpine When I directly use curl from the container shell: curl --unix-socket /var/ru ...

What is the process for alternating the execution of script actions between terminals within a Python script?

I am looking to create a script that will run a series of commands in different terminals. For example, I want to execute the command 'pwd' in the main terminal, then open an xterm window and switch to the home directory, and finally run the 'date' and 'ti ...

ajax is causing a delay due to a background process

During my PHP page, I am utilizing a background process. Interestingly, when I send a normal post request to this page, the action is completed quickly and the background process initiates with speed. However, when I trigger the same PHP page through AJAX, ...

Can you explain Node.js and its applications as well as how it is commonly used?

A while back, during my time at IBM when I was immersed in learning, I came across something known as BlueMix, a cloud product. Within BlueMix, there was a rather primitive component called Node.js. Since that moment, I've been filled with curiosity about ...

What are the steps to accessing and interpreting the information in /dev/log

Is there a way to read syslog messages directly from Python by accessing /dev/log? It seems like the correct approach is to use a datagram socket. import socket sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) sock.bind('/dev/log') sock ...

Problem with mobwrite - daemon refuses to initiate

I tried setting up MobWrite by following the instructions at http://code.google.com/p/google-mobwrite/wiki/Daemon, but encountered an issue when attempting to start the daemon. The error message received was as follows: (any ideas on how to resolve this? ...

Deploying applications on a distant computer using a Python script

For my current project, I am attempting to remotely install an "environment" on a machine using a Python script. This particular environment requires the user name and password to be passed to it. Despite trying various approaches, I have not been successf ...

Error encountered with firebase-tools: Permission denied due to EACCES issue

I've been attempting to deploy my web app using Firebase hosting. When I run the command firebase deploy in the terminal, I encounter an error. Note: The issue persists across all firebase commands, such as firebase --help, firebase -v, firebase log ...

Using perl ajax to modify a table

In my current Perl script, I am working on a functionality where I retrieve data from an xls file and display it as input text on a webpage. The objective is that when a user selects the edit option from a menu, the entire table fetched from the xls file w ...

Unable to determine the dimensions of the Kafka JSON message

My task involves sending a JSON message through Kafka, but my application has limitations on the size of messages it can handle. To construct the message, I am using a Python script. This script reads a base JSON from a file, transforms it, and then saves ...

How can the syntax of a JSON file be verified in Unix?

How can I verify the syntax of a JSON file in Unix and then automatically move any invalid files into an error folder? Thank you, Kavin ...

Set up the node npm package.json file to ensure that the "npm test" command runs smoothly on both unix and windows operating systems

Creating a node.js npm module on Windows and writing Mocha tests can be quite challenging. I discovered that in order for npm test to function properly, the package.json file needed to be configured like so: "scripts": { "test": "node node_modules/mocha/ ...

Retrieve keys only in a concise list using JQ

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 ...

What is the reason for the failure of line-buffered piping between this Python script and this socat script?

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 ...