Skip to content

Regular expression to search column in text file

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…

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…