Skip to content

Are linux shell pipes pipelined?

Given a file input.txt if I do something like is the output from the first command continuously passed (as soon as it is generated) as input to the second command? Or does the pipe wait until the first command finishes to start running the second command? Answer Yes, they’re pipelined — each compo…

Why can’t bash recognize the existence of a socket file

On a Linux box I want to check if a specific socket file exists. I know the socket files exists, but my checks in bash don’t show that to me: Why oh why can’t bash see that the file exists? Answer http://www.tldp.org/LDP/abs/html/fto.html Use -S to test if its a socket. -f is for regular files. Se…

How to combine DRBD, OCFs2 and LUKS?

I searched on the web a definitive answer to the following question but couldn’t find a clear YES or NO, or a clear procedure on how to enable this approach! In a two nodes setup, with DRBD as the block device replication technology, with OCFs2 as the clustered file system (which requires active/active …

Comparing two files at end of line in Linux

I would like to compare two files and get the output of matching string in one of the files at the end of the line: Let’s say I have two files:- file1: file2: I could do something like this: This gives me the following output: This is because abcdef in file2 matches both of those lines in file1. However…

glibc ( or libc6 ) library version

I am trying to figure out what is the correlation between the version from “GCC->ABI Policy” and the version from ldd –version From ABI Policy and Guidelines I see that for my GCC 4.8.4 I should have: When I run ldd –version I get: I don’t understand the corelation between thi…

Jenkins shell string quotation replacement

I have a Jenkins job with an execute shell box. In the execute shell I use bash instead of dash (sh). In the execute shell I have strings which are supposed to be interpreted as they contain escape sequences (in this case the new line: n), so here is an example execute shell: My problem here is that the scrip…