I have some file structure which contains projects with build folders at various depths. I’m trying to use zsh (extended) globbing to exclude files in build folders. I tried using the following command and many other variants: grep “string” (^build/)# I’m reading this as “Any fol…
Tag: linux
VTK/ITK project Requested modules not available on ubuntu
I would like to configure with cmake-gui a VTK/ITK project on ubuntu with QT and I have this error message. I don’t understand. How I can pass this error ? Answer When configuring VTK with CMake, you need to enable either vtkGUISupportQtOpenGL or VTK_Group_Qt. You can also change that setting now, then …
How do I locate a string in a binary file? (No, not the strings command.)
I know about the very useful “strings” command. It will print all the printable strings in a binary file. But what I want is a command that will tell me the location (in bytes or whatever — I’ll take anything.) of a string in a binary file. Is there a way to get this in Linux? Answer T…
AWK – Show lines where column contains a specific string
I have a document (.txt) composed like that. And I want to show some information by column. For example, I have some different information in “info3” shield, I want to see only the lines who are composed by “test” in “info3” column. I think I have to use sort but I’m …
Not able to connect Php application with SharePoint
I am a php developer have no experience with Share Point. I have follow these two links to get Data from Share Point into my Php application. stackoverflow question here. A Library for Share Point here. Share Point team give me 2 IP address. What they said is, I have to login at Forti Client with first IP the…
Renaming long file names in bulk
I have file names like: I want something like: Are there good ways to rename these files in linux? Answer You could try using a loop to extract the important part of the filename: This will simply give you a new list of filenames. You can then move them: To break this down a little: loop over the *.gz files
Executing HTTP POST using curl in bash with environment variables as data
I am trying to make a HTTP POST to a server using curl but I can’t seem to make it work. The server has the Content-Type set to application/json so I need to send a json object to the server. My object looks something like this If I try to use the following command it works But if I store
How to use get_random_bytes() in linux kernel module?
I have made simple kernel module. I printed out rand variable using seq_printf function. cb_funct function is called five times. Below is the result. random number : 66 random number : -5 random number : 135 random number : 178 random number : -42 Why negative variable is printed out? How to use get_random_by…
QtBlueTooth not functional on Linux
I’m developing an embedded application with bluetooth LE function enabled using Qt 5.7. The device I’m developing are meant to act as peripheral role, it can broadcast advertising packets and let smartphones to connect to. The target board are running with Ubuntu Linux 14.04, with bluez version 5.…
LINUX GNU Create New user Postgres DB in Makefile
I’m new with Makefile. I need to automate create user for postgres terminal. I tried this example and it did not work for me: Neither @create user myusername; nor @/q works. When I ran make createuser and exit manually with q from postgres terminal, I receive this error: Answer When debugging makefiles,…