Skip to content

Tag: linux

Convert CSV to TSV

How do you convert this csv file into a tab delimited file? Notice both the Surverys and Response columns are empty strings. I use this code to convert it to a tab file – It doesn’t convert the last column though. This is the output I get (Notice the last column is omitted) – There are 8 col…

Change exit code on a single line using Bash?

I am using the savscan command but this returns 3 instead of 1 when a malware is detected, and I need to get 1 if a malware is detected, I tried the following: but I still get the exit code 0, I also need to run everything in one line Answer Personally, I’d use a function wrapper for this: …as

How to filter a “diff” command to exclude certain entries?

I have to take some text my professor has given me, put it into two files, and I have to use the “diff” function to compare those two files. But, some lines in those files are missing an entry in the 6th (last) column. I need to filter the diff command to exclude those lines. I tried to use the

Discover “true” size of /proc/mounts

At the moment, I can determine when /proc/mounts changes using poll and the revents POLLERR | POLLPRI. I would now like to be able to compare the size of this pseudo-file before and after changing to determine whether a new mount has been attached, or an old one removed. I have tried to use ioctl(fd, FIONREAD…

How to run Rebol script on Linux 64-bit

I can not run this sample Rebol script on Debian 10 Linux 64-bit OS. The script is from the official Rebol tutorial. I’m trying to run it using this command from console: but it fails with error message I use the latest available build for Linux x86-64 from the official Rebol site. How to run the script…

Linker can’t find Lua library definition

So, I’m relatively new to C++ and I’ve been trying to run Lua files in my C++ project. To start off things, I ran this simple code: And the terminal command looks like this: Edit: Corrected to this Lua libraries are installed on my system (Linux), but the linker can’t find the definition for…

Cordova can’t find $ANDROID_HOME

I found a lot of solutions but they didn’t help me. I defined variables in /home/username/.zshrc And variables were defined because: Also command below works fine: I try to build a project Answer In tried many files with env variable for my linux In manjaro linux it needs to write env variables only in …

Can’t assign password to user with ansible user module

When I run this it does what it’s supposed to do. It creates the user and the home directory that I specify. It also prints out a password and the hash but I can’t log change to this user no matter what I do. Any suggestions on how I can get a password assigned to this user correctly would be