Skip to content

Subtract a constant number from a column

I have two large files (~10GB) as follows: file1.csv file2.csv I want to subtract 1 from the “id” columns of these files: file1_updated.csv file2_updated.csv I have tried awk ‘{print ($1 – 1) “,” $0}’ file2.csv, but did not get the correct result: Answer You’ve …

partial merging 2 text file in linux

I have 2 text file which I want to merge them in a new file. my first file is look like and second file = and my expected output like, I mean mapping part of 9th column string from first line with 1st column of second file, should be like : Also, I wanted to keep line from first file

X11: XQueryPointer gives me fuzzy Windows

I am currently trying to find if one of my Windows is underneath the Mouse cursor. This is not done in my process that creates the window, but in another process. What I am currently doing is finding the Window via the process PID (and I made sure _NET_WM_PID is set correctly by my program). This basically wo…

How can i generate the response file for my binary installable?

I have the binary file to install a component when i am running using ./filename.bin it comes into console mode and asks for language selection and directory selection and all , i tried ./filename.bin -r path/response.properties, help me if anyone knows. Answer as you said that you have already tried using ./…

EC2 User Access or File Access Problems?

I’ve been having some issues using an EC2 instance when I try and call CLI commands. I am using Laravel but I cant quite be sure if it is a Laravel issue or EC2. When I ssh into my EC2 instance, I run the following laravel command to migrate my database: php artisan migrate And I get the following error…

find command not printing files with .wav extension as specified

I’ve tried using this command to recursively search a folder and print .wav files, showing only the file names (not the location): I’ve also tried putting .wav in double quotes like so: When I check the Wav_files.txt file there are also .xml files listed. I only intend to print the .wav files- Wha…

PHP exec sudo script not working despite having sudo rights

My php script: my visudo line (I tripled checked every path) If i remove the ‘sudo’ in the exec() it will execute (i put a touch aaa at the start, with sudo the file isn’t even created so the script doesn’t even begin to execute). The script has exec rights for everyone. I can’t …