I am having trouble getting a regular expression that will search for an input term in the specified column. If the term is found in that column, then it needs to output that whole line. These are my variables: the text file is in this format with a space being the field seperator, with many contact entries: …
Copy bulk files to another destination using a given prefix in bash
I want to copy all the files newer than another one from their original location /lib/ into another destination /dest/lib/ To identify these files I simply use: Unfortunately I cannot simply use this command because cp does not know how to create folders on the fly. So I used this command: This looks very com…
script to change format of text [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 years ago. Improve this question I want to change a text file that contains for example : a 1 b 2 a 3 b 4 to: a b 1 2
Linux – flip last bottom lines only, with awk
We are currently learning some awk commands to manipulate/rearrange text on files. our original text goes like this..1998 It’s asking us to rearrange the columns (part one) which i already did.. but at the same time to flip the bottom two lines (part two) so that it looks like this again, i got the orde…
Programming in Linux – FIFO
I have created fifo, try to write to it: echo “text” > myfifo and read it with my programm. But when I write to fifo nothing shows. I have tried many options, turning off and on NON_BLOCK mode and so on but nothing seems to help. Answer This needs to be (there’s probably no need for the O…
Tail a log file on linux and trigger a script if words are matched
I’m looking for a way to watch multiple logfiles on linux and look for words or phrases inside and if found, trigger a script or action, this will need to be constant. I know this can be done with some grep, tail hack but I want to know if there is something premade for this with config options, for ins…
How to install folders from index to windows or 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 …
Split TTY device based on packet type
I have a TTY device setup to monitor a serial port of a combined bluetooth/GPS chip. I’m using blueZ to implement the bluetooth stack and do everything bluetooth related. The data being sent across this port is all HCI packets, even the GPS data. The GPS data is wrapped in an HCI packet of type 0xXX (in…
chown and chmod doesn’t work (Raspberry Pi 2 – Jessie)
I would like to make a fileserver at home using Raspberry Pi 2. Currently there are 3 users: root, pi and alma. My connected external drive is mounted automatically to /media/pi/TOURO I would like to share “Share” directory on this drive for “alma” users (with read+write permissions) T…
How to read the external timer counter on the BeagleBone Black?
I need to count the transitions of a 50KHz binary signal using a BBB. I think using the TIMER4 triggered by the external signal connected to the pin P8.07 would be the easiest way. So, I issued the following commands to load the proper cape and setup the pin as a timer : Everything seems to work and nothing a…