grep –ignore-case –only

This is a known bug on the initial 2.5.1, and has been fixed in early 2007 (Redhat 2.5.1-5) according to the bug reports. Unfortunately Apple is still using 2.5.1 even on Mac OS X 10.7.2. You could get a newer version via Homebrew (3.0) or MacPorts (2.26) or fink (3.0-1). Edit: Apparently it has been … Read more

What is the role of libc(glibc) in our linux app?

libc implements both standard C functions like strcpy() and POSIX functions (which may be system calls) like getpid(). Note that not all standard C functions are in libc – most math functions are in libm. You cannot directly make system calls in the same way that you call normal functions because calls to the kernel … Read more

What’s the difference of section and segment in ELF file format

But what’s difference between section and segment? Exactly what you quoted: the segments contain information needed at runtime, while the sections contain information needed during linking. does a segment contain one or more sections? A segment can contain 0 or more sections. Example: readelf -l /bin/date Elf file type is EXEC (Executable file) Entry point … Read more

How to Export Private / Secret ASC Key to Decrypt GPG Files

You can export the private key with the command-line tool from GPG. It works on the Windows-shell. Use the following command: gpg –export-secret-keys A normal export with –export will not include any private keys, therefore you have to use –export-secret-keys. Edit: To sum up the information given in my comments, this is the command that … Read more

grep regex whitespace behavior

This looks like a behavior difference in the handling of \s between grep 2.5 and newer versions (a bug in old grep?). I confirm your result with grep 2.5.4, but all four of your greps do work when using grep 2.6.3 (Ubuntu 10.10). Note: GNU grep 2.5.4 echo “foo bar” | grep “\s” (doesn’t match) … Read more

Compiling a C++ program with GCC

gcc can actually compile C++ code just fine. The errors you received are linker errors, not compiler errors. Odds are that if you change the compilation line to be this: gcc info.C -lstdc++ which makes it link to the standard C++ library, then it will work just fine. However, you should just make your life … Read more

How to use GNU sed on Mac OS 10.10+, ‘brew install –default-names’ no longer supported

Note (2019): The –with-default-names option is removed since January 2019, so now that option is not available anymore. When installing, Homebrew instructs on how to adapt the path, if one wants to use sed without the g prefix. You already have the gnu-sed installed without the –with-default-names option. With –with-default-names option it installs sed to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)