Skip to content

Tag: linux

Are there any solutions to this command(shell code) problem

I have some shell codes looks like: but, get an error “-bash: syntax error near unexpected token `(‘” which i can’t fix it. I do know the pipeline command can also do it well. likes but actually I wish to do something in the loops like change the global value and the pipeline didn&#821…

Can`t call command with variable on sh file using ssh

I have the script on centos 7 server for kill process by used id: Above script works fine when it is called from the server. But my goal calls this file using ssh from my local machine like: But I git this error: Answer you need to install lsof on the remote server. or try to add the full path

How to pass backtick to Dockerfile CMD?

I have a docker image running java application, its main class is dynamic, in a file called start-class. Traditionally, I started the application like this. Now I want to run these applications in docker containers. This is my Dockerfile. I built the image and run the containers. The command actually executed…

Ctypes linux behavior differs on py2 and py3

While writing a python wrapper for the getmntent linux libc function, there is a strange difference between the behaviour between python 2.x and 3.x for the following code where most of the real work is done by the C library. Since I interface C code with python often, Can anyone explain or correct what is go…

Transform a Commande Line Linux to a makefile [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago. Improve this question Is there anyone who can help me to transform this command line to a makefile : gcc -o hello_…

mixing process substitution and pipes in zsh

Using ZSH, I am trying to wrap a sed command into a function, then use it, while mixing pipes with process substution. Let me explain with an example: As you can see, in those 2 out of those 3 usages work. The last one is the one that intrigues me here. (Note that all commands work with bash) Can you