65,566 reputation
863145
bio website
location European Union
age
visits member for 1 year, 7 months
seen 1 hour ago

Mar
27
revised Count result in a find/exec statement
quoting issues, more useful $0
Mar
27
answered Range of the command cut in unix
Mar
27
revised How can I identify lines in files over a certain length
Adding `-n` for line numbers as per updated requirements.
Mar
27
comment How can I identify lines in files over a certain length
That's going to be extremely slow and handles the backslash characters specially. while read loops to process text are really bad practice.
Mar
27
revised How can I identify lines in files over a certain length
added 4 characters in body
Mar
27
comment How can I identify lines in files over a certain length
@1_CR, That's POSIX and can be shortened to awk '/.{6}/' (actually GNU awk until recently used to be the one where that wouldn't work unless you pass POSIXLY_CORRECT to its environment).
Mar
27
answered How can I identify lines in files over a certain length
Mar
27
comment What's the difference between \b and \< in the grep command
The part that starts with The important thing
Mar
27
comment What's the difference between \b and \< in the grep command
I don't agree with your first sentence, a word boundary is the (0-width) transition between a word character and a non-word character (or the beginning/end of the line/record). So in a%b%, we've got 4 word boundaries, <a>%<b>% two of which are transitions from non-word to word, two from word to non-word. \< matches in between % and b.
Mar
27
comment bash find lines starting with string
@1_CR, That would load the whole file in memory if there's no NUL character in there and that assumes lines don't contain NUL characters. Also note that older versions of GNU grep (which the OP has) can't use -z with -P. There's no \N without -P, you'd need to write it $'[\01-\011\013-\0377]' which would only work in C locales (see thread.gmane.org/gmane.comp.gnu.grep.bugs/5187)
Mar
27
awarded  Enlightened
Mar
27
awarded  Nice Answer
Mar
27
comment different loopback mounted volumes exported through NFS are seen as 1 by the client
The UUID is information stored in the filesystem meta-data. blkid, misleadingly doesn't give the id of the block device (there's no such thing, unless you want to consider hard disk serial numbers, or partition IDs for those partitioning schemes (like GPT or LVM) that support them), but the id of the filesystem stored on that block device.
Mar
27
comment different loopback mounted volumes exported through NFS are seen as 1 by the client
It says it's using the UUID by default, and if you've cloned the images, the UUID would be the same.
Mar
27
comment What's the difference between \b and \< in the grep command
Note that for three letter words, you'd have to write it \<\w{3}\> anyway, and that would be the same as \b\w{3}\b
Mar
27
comment What's the difference between \b and \< in the grep command
Note those are transitions from word to non-word characters, they have nothing to do with spaces (which is just one of many non-word characters).
Mar
27
comment different loopback mounted volumes exported through NFS are seen as 1 by the client
Look at the fsid option in the exports man page.
Mar
27
comment What's the difference between \b and \< in the grep command
@Graeme: \<..\> would search for 2-letter words.
Mar
26
comment Why do ls and hexdump disagree about my file size?
That file contains 3 bytes in one line containing one 2-byte UTF-8 encoded character. See od -vtx1 to see the hex values.
Mar
26
comment Is there a way to 'tee' input to a program or script?
@mikeserv, by the way, your answer (now deleted) as it is would work with zsh, which with the mult_ios option implements a cat internally when a fd is redirected for input several times (but that's still a pipe, not a terminal).