How to get linux console $COLUMNS and $ROWS from PHP cli?

I'm currently creating a new neat CLI library for PHP, and i'd like to figure out the width/height of the console it's running in. I've tried many things like digging through $_ENV, exec("echo...

How can I test if line is empty in shell script?

I have a shell script like this: cat file | while read line do # run some commands using $line done Now I need to check if the line contains any non-whitespace character ([\n\t ]), and...

How can I have a newline in a string in sh?

This STR="Hello\nWorld" echo $STR produces as output Hello\nWorld instead of Hello World What should I do to have a newline in a string? Note: This question is not about echo. I'm aware of...

How to execute script in the current shell on Linux?

Is there a way to mark a script to be executed in the current shell from whitin It? I know I can use: . ./path/myscript.sh but I need a way to include the "dot" way inside the script. Edit: Here...

calculate total used disk space by files older than 180 days using find

I am trying to find the total disk space used by files older than 180 days in a particular directory. This is what I'm using: find . -mtime +180 -exec du -sh {} \; but the above is quiet...

How can I split a shell command over multiple lines when using an IF statement?

How can I split a command over multiple lines in the shell, when the command is part of an if statement? This works: if ! fab --fabfile=.deploy/fabfile.py --forward-agent --disable-known-hosts...

How to keep Docker container running after starting services?

I've seen a bunch of tutorials that seem do the same thing I'm trying to do, but for some reason my Docker containers exit. Basically, I'm setting up a web-server and a few daemons inside a Docker...

Error: log4j-api-2.9.0.jar is a multi-release jar file but --multi-release option is not set

Exploring the maven-jdeps-plugin:3.1.0 with Java9 using the following minimal pom.xml:- <dependencies> <dependency> <groupId>org.apache.logging.log4j</groupId> ...

Error running storybook - sh: 1: start-storybook: not found

I am facing error running storybook.... even on a clean installation. npm run storybook > @ storybook /media/programmersedge/New_Volume/devs/demostorybook > start-storybook -p 9001 -c...

In laravel npm run dev errors:

I have next errors output running npm command for my laravel 5.6 with bootstrap project: $ npm run dev > @ dev /mnt/_work_sdb8/wwwroot/lar/B4test > npm run development > @ development...

docker-compose "No such file or directory" for sh-command

I am setting up docker-for-windows on my private pc. When I set it up a while ago on my office laptop I had the same issue but it just stopped happening. So I am stuck with this: I have a...

How to uninstall Rust that was installed via rustup?

I installed Rust on my Ubuntu 16.04 machine through curl https://sh.rustup.rs -sSf | sh as can be seen on the Installation Page. How do I now uninstall Rust?

How to run Docker and Docker-Compose from a Dockerized Jenkins container?

I have this docker-compose to run a Dockerized Jenkins container, version: '2' services: jenkins: image: 'jenkinsci/blueocean' environment: - JENKINS_OPTS="--prefix=/jenkins" ...

docker-compose/django TypeError: expected str, bytes or os.PathLike object, not NoneType

I'm trying to set up my Django and postgres dev environment with docker so I can run it on other machines more easily as well as run everything from 1 terminal window (I'll be adding my react...

Command PhaseScriptExecution failed with a nonzero exit code while trying to add Flutter to iOS app

I am trying to add flutter to the existing app. So before doing on the production app I tried with brand new Xcode 10 Single View Application. I followed the tutorial here on...

How to get docker-compose to work in docker generated jenkins pipeline on windows?

I am running this code to start up a dockerized jenkins. This works. docker run -p 81:8080 -p 50000:50000 --name myjenkins --privileged -v %cd%/jenkins:/var/jenkins_home -v...

Angular - Getting sh: ng: command not found while running "npm run ng build" in Jenkins

I am trying to build an angular project in Jenkins Tried both "build": "npm run ng build", as well as "build": "ng build" but getting the same error. Could it be because of the way this...

Detach command from SSH session

I need to run commands on a server via an SSH session and close the session without killing the process on the server. How can this be implemented correctly. Server and client are linux...

Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65

I am new in react native development. I am using new MacBook Air (M1, 2020) with M1 chip. I have Installed the dependency below: Node = v14.15.3 Npm = 6.14.9 Homebrew = 2.7.0 react-native-cli:...

Docker-compose volumes with DigitalOcean

My docker build works on my devices. When I upload to digital-ocean server and execute the "docker-compose up -d" command, all containers are launched except for "frontend". The problem is with...

error building docker image 'executor failed running [/bin/sh -c apt-get -y update]'

I'm trying to build a docker image but it throws an error and I can't seem to figure out why. It is stuck at RUN apt-get -y update with the following error messages: 4.436 E: Release file for...

AssemblyScript on NEAR: `/bin/sh: asb: command not found` when deploying Guest Book with yarn

When running the GuestBook example on NEAR using yarn deploy the following error is produced: /bin/sh: asb: command not found This appears to be happening to people using the Figment Learn NEAR...

Accessing rexray/ebs volume from ECS host

I've managed to follow https://aws.amazon.com/blogs/compute/amazon-ecs-and-docker-volume-drivers-amazon-ebs/ and run my Container-based service on ECS using rex-ray Docker volume plugin. I can...

Docker and Flutter Web hot reload

I'm trying to web development environment with Flutter in docker with docker compose. *I stuck with a hot reload for Flutter, is there any way to make it work? (except installing VSCode on...

how to make static files works using django docker nginx and postgresql since its not serving them

When i try to access http://127.0.0.1:8000/admin, i get this. my folder structure is : django-react-nginx | |_ _ docker-compose.yml | > backend | |_ Dockerfile | ...

Error "Failed to initialize virtualenvwrapper." (WSL Windows 10)

Intro In my WSL (Wsman Shell commandLine, version 0.2.1) on Windows 10, I got pyenv installed and try to use pyenv-virtualenvwrapper. Yet, I can't seem to get it up and running, not even with the...

GitLab CI collapsible regions are behaving weird

I'm trying to ouptut custom collapsible regions on Gitlab CI, using the recommendation as per the GitLab CI docs, however this isn't working as expected. I'm running the docker:20.10.7 image which...

Having trouble installing npm on mac M1

npm WARN old lockfile npm WARN old lockfile The package-lock.json file was created with an old version of npm, npm WARN old lockfile so supplemental metadata must be fetched from the...

TypeScript project failing to deploy to App Engine targeting Node 12 or 14, but works with Node 10

I have a TypeScript project that has been deployed several times without any problems to Google App Engine, Standard environment, running Node 10. However, when I try to update the App Engine...

Windows 10 WSL2 Docker build fails with /bin/sh: /usr/bin/create-user.sh: not found

I am trying to build an image on Windows 10 WSL2 Docker. My dockerfile is: FROM i386/openjdk:8-jre-alpine MAINTAINER Digital Life Studios EXPOSE 8888/TCP COPY ["create-user.sh", "startup.sh",...