Skip to content

Tag: ubuntu

how to customize select loop in bash

I was wondering if is possible customize the select loop for bash. I have this code: Output is something like this: I would like to order the options in landscape view and also change the prompt [#?] by something else Thanks Answer select displays the PS3 prompt. You could try something like:

how to use git log and grep together?

I am trying to use git log and grep together with pipe. However, it doesn’t seem to work. I am grepping for the bug-id from the git log. Here is what I am doing. Answer You can use git log –grep “BUG-1024”

Ubuntu kernel kills CPLEX ILP process due to out of memory

I’m working with the ILOG CPLEX library in Java to solve an ILP problem. I’m using the default settings and did not adjust any parameters. I used the example code which I found online in samples for my main loop: I launched my jar on an Ubuntu 14 system with 24GB RAM and let it solve larger proble…

Cannot pass STDIN using shell_exec() in PHP

I am a complete beginner in PHP. I want to execute a java .jar file using PHP.The jar file takes input from STDIN and generates the output at STDOUT.To execute the jar file this is what I do in my Ubuntu Linux terminal: This works perfect.However when I replicate this in PHP as: This sends $p the output gener…

Docker container apt-get install can’t find package

I’m trying to spin up a docker container that populates mongo via a node.js script that I have. With the script below, I get the error : with this dockerfile: Why does apt-get not find nodejs? Answer Seems i was missing RUN curl –silent –location https://deb.nodesource.com/setup_0.10 | bash …

Create user on remote linux with Jenkins

I need to run a ssh script on a remote linux server to add a user but nothing I do quite works. I make up the username of 2 Parameters and then try to make the password of which the first part is a set string but the second part is also a Parameter. I am using the Jenkins SSH

Command to change tomcat server port

I’m using ubuntu, and I’m in a need of some command, using which I can change the server port configurations. Therefore, my question is… Is there any linux command, to update the Tomcat server connection port, as well as server shutdown port? Answer maksim_khokhlov answer looks promising if …

perf enable demangling of callgraph

How do I enable C++ demangling for the perf callgraph? It seems to demangle symbols when I go into annotate mode, but not in the main callgraph. Sample code (using Google Benchmark): build command: perf commands: I’ve also tried enabling the –demangle option, but that doesn’t seem to affect …