Questions tagged [gnu]

This tag is for programming questions related to software and tools provided by the GNU ("GNU's Not Unix") project.

The GNU Project is a free software, mass collaboration project, announced on September 27, 1983, by Richard Stallman at MIT. It initiated GNU operating system development in 1984. The founding goal of the project was, in the words of its initial announcement, to develop "a sufficient body of free software [...] to get along without any software that is not free."

To make this happen, the GNU Project began working on an operating system called GNU ("GNU" is a recursive acronym that stands for "GNU's Not Unix"). This goal of making a free software operating system was achieved in 1992 when the last gap in the GNU system, a kernel, was filled by the third-party Linux kernel being released as Free Software, under version 2 of the GNU GPL.

2807 questions
48
votes
0 answers

What delimiters can you use in sed?

We normally see people complaining about the unknown option to s' error in sed when they want to use a pattern that contains the sed delimiter. For example, if we are using /: $ var="hel/lo" $ sed "s/a/$var/g" <<< "haha" sed: -e expression #1, char…
fedorqui
  • 275,237
  • 103
  • 548
  • 598
45
votes
5 answers

What is the command to match brackets in Emacs?

What is the command to match brackets in Emacs (the equivalent of the % command in Vim)?
Chris Huang-Leaver
  • 6,059
  • 6
  • 41
  • 67
44
votes
2 answers

Makefile ifeq logical AND

I would like to check multiple conditions in an if loop of GNU make file. Here's an example: ifeq ($(TEST_FLAG),TRUE && ($(DEBUG_FLAG),FALSE)) true statement else false statement endif What's the right way to do it?
Arun Kumar
  • 441
  • 1
  • 4
  • 6
43
votes
7 answers

In what order prerequisites will be made by the GNU make?

Assuming we have the rule: a: b c d e and b, c, d and e are independent of each other. Is the order of making b, c, d, e defined? It seems that generally they will be made in order b, c, d, e, but may it sometimes happen, that the order will be…
peper0
  • 433
  • 1
  • 4
  • 4
39
votes
2 answers

What is the point of "grep -q"

I was reading the grep man page and came across the -q option, which tells grep to "not write anything to standard output. Exit immediately with zero status if any match is found, even if an error was detected." I don't understand why this could be…
jsarbour
  • 928
  • 1
  • 8
  • 20
39
votes
5 answers

How to register FUSE filesystem type with mount(8) and fstab?

I've written a small FUSE-based filesystem and now the only part's missing is that I want to register it with fstab(5) to auto-mount it on system startup and/or manually mount it with just mount /srv/virtual-db. How can I achieve this? I know, I can…
drdaeman
  • 11,159
  • 7
  • 59
  • 104
38
votes
4 answers

Best way to get machine id on Linux?

What is the best-practiced way to get an unique machine ID in GNU/Linux for i386 architecture? Are there any good ways except the mac address?
user663896
37
votes
12 answers

gcc-arm-linux-gnueabi command not found

I am trying to install the gnu arm toolchain for ubuntu. I first downloaded the tar from CodeSourcery. However when I go into the bin folder, I cannot run any of the binaries. I have tried with ./ and without and putting it in the PATH and it keeps…
user1952441
  • 405
  • 1
  • 5
  • 4
36
votes
9 answers

Makefile (Auto-Dependency Generation)

just for quick terminology: #basic makefile rule target: dependencies recipe The Problem: I want to generate the dependencies automatically. For example, I am hoping to turn this: #one of my targets file.o: file.cpp 1.h 2.h 3.h 4.h 5.h 6.h…
Trevor Hickey
  • 36,288
  • 32
  • 162
  • 271
36
votes
2 answers

_GNU_SOURCE and __USE_GNU

I want to use CPU_SET, which is a glibc linux-specific macro that should be defined in sched.h The manpage clearly states that _GNU_SOURCE must be defined so that the macro is defined. However, looking at the header, CPU_SET is defined only if…
Foo Bah
  • 25,660
  • 5
  • 55
  • 79
36
votes
2 answers

What does -D_DEFAULT_SOURCE do?

Previously I was receiving warnings from gcc -std=c99 that usleep() was implicitly declared. Then I stumbled across this stackoverflow post, which led me to use -D_BSD_SOURCE. However, now gcc tells me that -D_BSD_SOURCE has been deprecated and I…
ryanmjacobs
  • 575
  • 1
  • 5
  • 9
36
votes
1 answer

How to read and execute GDB commands from a file?

I run GDB on object file (e.g exeFile) and I want to examine it according to several commands . How can I execute these commands according to lines in a file (instead input these each GDN running) ? For example - I want to set break in - break…
URL87
  • 10,667
  • 35
  • 107
  • 174
35
votes
3 answers

how to set key font size in gnuplot?

How to set key(legend) font size in gnuplot? I read the gnuplot introduction file and find no related configuration about this property. I can set font type and size for labels, tics, but only key can not be set the font?
victor
  • 655
  • 2
  • 6
  • 7
33
votes
4 answers

Whether to escape ( and ) in regex using GNU sed

I've noticed several posts on this site which say that with gnu sed you should use ( and ) in regex rather than \( and \). But then I looked in the gnu sed manual and saw that they specify that \( and \) must be used. What's up?
grok12
  • 3,526
  • 6
  • 26
  • 27
33
votes
2 answers

C++ -fvisibility=hidden -fvisibility-inlines-hidden

I have a question about the C++ visibility attribute. I have read http://gcc.gnu.org/wiki/Visibility and yet I dont quite understand how it works. I want use the visibility to be hidden on some of my shared libraries I have. I believe this means…
nixgadget
  • 6,983
  • 16
  • 70
  • 103