This sequence of commands works: However, the corresponding C program does not work as expected (it seems it does not unmount the previous /proc, and also it provides EBUSY trying to unmount the devpts): I omitted here error checking for readability I think that unshare or unmount does not work as expect: even if it returns zero, it seems that
Protractor Js run to linux machine
I have protractor tests in my angular project, and when I would like run it i catch next exception log: And before it I see browser window with next url: data:,. UPD protractor.conf.js UPD2 If I use seleniumAddress: ‘http://localhost:4444/wd/hub’, I catch next exception: Help me please run this test in my pc. Thanks a lot. Answer If you want to
Awk: How do I count occurrences of a string across columns and find the maximum across rows?
I have a problem with my bash script on Linux. My input looks like this: etc… which y=yes and n=no and that is the results of voting… and now I want with using awk to display the name and the total yes vote of each person (name) and the person that win (got the most y), any ideas? I do
How to read from serial device in C++
I’m trying to figure out how I should read/write to my Arduino using serial communication in Linux C++. Currently I’m trying to read a response from my Arudino that I “trigger” with I’ve tried looking at the response from my Arduino in my terminal, by using the following command: This is working as it should. Now I want to do
ls command ignore specific directory [bash]
Tree: ls : Ignore specific file: ls -I c.txt : Ignore specific directory: ls -I Tests : (does not work – Tests directory should not appear) Answer The “man page” for the ls command explains that the -I flag accepts a pattern. So you can use a wildcard in your command: See: man ls or the commands online man page
reading from stdin after execl() bash return an eio(Input/output error)
The following code can act as expected if executed by a shell. But if I set this program as a user’s shell and ssh into the host to execute this program as a shell, the read(0, &buf123, 1); will return an EIO(Input/output error): But if a change execl(bash) into non-interactive bash execl(bash -c “id”) or other program rather than bash,
Getting number of pattern matches in VTE search
I’m developing a GTK+ 3.0 application that uses VTE widget, how can I get the number of occurrences for the search regex or at least get the current text in terminal and process that? I’m using VTE 2.91 and Vala. Answer Vte.Terminal.get_text() will get you the currently visible text in the terminal for processing. I’m not sure that that includes
how do I kill a port in use — eventmachine
I get the following error: I’m not sure what the process or port is and want to kill it so I can run my script again. How do I do that? Answer Example:
Module not found when I do a modprobe
I am trying to install this module: https://github.com/mkottman/acpi_call I did a make, make install. I then saw acpi_call.ko is in /lib/modules/4.3.3-5-default/extra/. When I do a modprobe acpi_call I get modprobe: FATAL: Module acpi_call not found in directory /lib/modules/4.3.3-5-default Tried putting acpi_call.ko in /lib/modules/4.3.3-5-default but got the same result. I would like to make it persistent so that when I reboot,
How to cross-compile with SDL 2 from Linux for Windows
I tried to compile a simple C++ program that uses SDL 2 with the mingw-w64-g++ compiler on my Arch Linux (64bits). For this I downloaded SDL2-devel-2.0.4-mingw.tar.gz from here prog.cpp: Makefile: Now making gives the error: Why undefined reference to `SDL_main’ ? Although I specified -lSDL2main ? What did I do wrong? 🙁 Answer Okay, it was because of the main