I have multiple .tsv files named as choochoo1.tsv, choochoo2.tsv, … choochoo(nth).tsv files. I also have a main.tsv file. I want to extract the header line in main.tsv and paste over all choochoo(nth).tsv files. Please note that there are other .tsv files in the directory that I don’t want to chan…
split text file (Genome data) based on column values keeping header line
I have a big genome data file (.txt) in the format below. I would like to split it based on chromosome column chr1, chr2..chrX,chrY and so forth keeping the header line in all splitted files. How can I do this using unix/linux command? genome data result Answer Is this data for the human genome (i.e. always 4…
pthread_cancel and cancellation point
I’m learning the pthread_cancel function and testing whether thread would be cancelled when it doesn’t reach cancellation point. Thread is created by default attribute and make it running in add loop. But when cancellation request was sent and thread exit immediately. It doesn’t reach cancel…
sh/awk (partly) script returning a null value but want it to return a value
I have the following sh script: the values that it is outputting looks like the following: As you can see it is returning a null value against the following line: This should look like the lines above and below. ([time] – [time] – [duration] etc) Which is in turn effecting the time calculation ( n…
Phusion Passenger – ActiveRecord::PendingMigrationError
I am trying to run simple RoR application with Phusion Passenger. At the moment when go to localhost I see the error from subject. In fact I don’t have any pending migration: My platform is Linux (Debian 8 Jessie 64x). My database is MySQL (gem ‘mysql2’, ‘~> 0.3.18’). I am usi…
How to disable serial console(non-kernel) in u-boot
I am building a Yocto image for Intel Edison. One of the image’s components is u-boot with an Edison-specific patch. By default, Edison’s UART port is used for u-boot console. I want to disable this feature, but only on the serial interface(u-boot also listens on USB and that needs to stay). My ma…
linux Makefile syntax for blank lines in screen output
i have this makefile: It results the below output: what i am looking to do is create a space between “prompt> make” and the first happening of gfortran. and ideally i would like the output on the screen to first print out the contents of my COMPILER_VERSION variable before the first gfortran ha…
RaspBerry Pi Command Line/Application – List IP Devices
I’m trying to make a very simple Raspberry Pi application that would auto-update with all the IP addresses, Mac addresses, and their respective device names that are all on the same network. I have absolutely no idea where to start, any recommendations on how to get this done? I play to connect a LCD an…
How to detect that a child process has crashed?
A child process can: Exit normally (by exiting using exit(0),exit(22), exit(23)) — This is obviously specific to my application Exit abnormally (code throws an exception, receives an unhandled signal, core dumps, etc…) I am doing a fork/exec from a parent process and looping on waitpid, when I det…
Strange mouse bug on linux [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …