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
33
votes
2 answers

Set font size of values numbers on the axis

How do I set the font size for the values on both the x and y-axis? I've looked around and I've only found ways to change the xlabel's size and ylabel's size, but I want the actual numbers below the axis to be bigger.
bb2
  • 2,872
  • 7
  • 37
  • 45
32
votes
5 answers

Testing if a file exists in makefile target, and quitting if not present

Is there a way to exit with an error condition if a file does not exist? I am currently doing something like this: all: foo foo: test -s /opt/local/bin/gsort || echo "GNU sort does not exist! Exiting..." && exit Running make runs the all…
Alex Reynolds
  • 95,983
  • 54
  • 240
  • 345
32
votes
1 answer

Displaying struct values in GDB

In GDB, given a variable that points to a struct, print will display the raw pointer value and x will display the raw bytes pointed to. Is there any way to display the data pointed to as that struct, i.e. a list of fields and their values?
rwallace
  • 31,405
  • 40
  • 123
  • 242
31
votes
4 answers

How to store the output of a command in a variable at the same time as printing the output?

Say I want to echo something and capture it in a variable, at the same time I see it in my screen. echo "hello" | tee tmp_file var=$(< tmp_file) So now I could see hello in my terminal as well as saving it into the variable $var. However, is there…
fedorqui
  • 275,237
  • 103
  • 548
  • 598
31
votes
4 answers

Include binary file with GNU ld linker script

I have a working linker script. I want to add another data section whose contents is pulled directly from a file (ld shouldn't parse it and extract the sections and so on). How can I do that? OUTPUT_FORMAT("elf32-i386") ENTRY(start) SECTIONS { …
Pandemonium
  • 421
  • 1
  • 4
  • 7
30
votes
4 answers

How do you "echo" the last configure/make build --options within a source directory?

When doing a a GNU-style " ./configure, make, and install " - with specific options, flags, etc... As you all know, sometimes this can be a black art.. and what works for one piece of software may not for any other... Now, imagine that you had…
Alex Gray
  • 16,007
  • 9
  • 96
  • 118
30
votes
2 answers

Grep's "Invalid range end" ­— bug or feature?

I've got these three files: $ cat pattern-ok ['\-] $ cat pattern-buggy [\-'] $ cat text abc'def-ghi And now, is the following a bug or a regexp feature I don't know? $ cat text | grep -f pattern-ok abc'def-ghi $ cat text | grep -f…
Michal Rus
  • 1,796
  • 2
  • 18
  • 27
30
votes
3 answers

Is the iTextSharp DLL free to use and redistribute with my web application project?

Is the iTextSharp DLL free to use and redistribute with my web application project which i will be selling?
Shyju
  • 214,206
  • 104
  • 411
  • 497
30
votes
7 answers

gnu screen - changing the default escape command key to ALT-X?

In GNU screen, I want to change the default command binding to Alt-s (by tweaking .screenrc) instead of the default C-a, the reason is I use emacs hence GNU screen binds the C-a key, sending "C-a" to the emacs becomes tedious (as @Nils said, to send…
Siva
  • 711
  • 1
  • 5
  • 8
30
votes
5 answers

Linker error on a C project using Eclipse

I want create a project for the STM32F217IG microcontroller. So I installed Eclipse and the GNU for ARM embedded GCC cross compiler. I don't think it is the Code Sourcery one. I used it, because it supports floating point and Code Sourcery does…
damien
  • 415
  • 1
  • 6
  • 13
30
votes
3 answers

How can I make bash deal with long param using "getopt" command in mac?

I want to make my bash script deal with long parameters. I found getopt, but it isn't supported in OS X. Can anyone tell me why getopt was implemented by BSD, but not GNU? I tried building getopt in GNU C lib, but it failed for my poor skills with…
qiushuitian
  • 1,261
  • 4
  • 19
  • 31
29
votes
2 answers

How to interpret the output of the ldd program?

[root@wdctc1281 bin]# ldd node linux-vdso.so.1 => (0x00007fffd33f2000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f70f7855000) librt.so.1 => /lib64/librt.so.1 (0x00007f70f764d000) libstdc++.so.6 =>…
liam xu
  • 2,892
  • 10
  • 42
  • 65
28
votes
4 answers

How can I detect BSD vs. GNU version of date in shell script

I am writing a shell script that needs to do some date string manipulation. The script should work across as many *nix variants as possible, so I need to handle situations where the machine might have the BSD or the GNU version of date. What would…
bryan kennedy
  • 6,969
  • 5
  • 43
  • 64
28
votes
4 answers

What GNU/Linux command-line tool would I use for performing a search and replace on a file?

What GNU/Linux command-line tool would I use for performing a search and replace on a file? Can the search text, and replacement, be specified in a regex format?
Ben Lever
  • 2,023
  • 7
  • 26
  • 34
27
votes
6 answers

GnuPG: "decryption failed: secret key not available" error from gpg on Windows

Environment: HP laptop with Windows XP SP2 I had created some encrypted files using GnuPG (gpg) for Windows. Yesterday, my hard disk failed so I had reimage the hard disk. I have now reinstalled gpg and regenerated my keys using the same…
Suresh Ramaswamy