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̵…
Tag: linux
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 and when are interrupt key combination,such as CTRL-C, translated to signals?
Using a Linux OS, I need to transparently pass all keystrokes from remote connections to local hardware connections. This is fairly straight forward for everything but signals. I know I can register handlers for each signal that capture and pass the keystroke, but this seems like a hack that might not work fo…
How to resolve “setsockopt(3, SOL_SOCKET, SO_MARK, [10], 4) = -1 EPERM” Operation denied for none root users
I got two network interfaces (ethernet and wlan). Now I found a little script on github (https://github.com/Intika-Linux-Firewall/App-Route-Jail) which seems to allow me to route specific applications through the none default gateway to loadbalance the traffic a little bit. The script is using the following c…
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…
How do I use Rust to open the user’s default editor and get the edited content?
When you use git commit without the -m flag it opens your default editor, which is set by the $EDITOR environment variable. Doing so enables you to edit multiple lines, navigate with the arrows and submit the text when you’re done. I’d like to do something similar with my command line program. It …
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
How to use Mysql Connection String inside PHP code which is served by Azure Lunix App Service
I’m trying to host WordPress to Azure lunix App service. I created a Azure Database for MySQL, then I got the web app connection string from the connection strings screen. The connection string format is Then I created a Linux based app service and added the MySQL connection string to its configuration.…