Questions tagged [programming]

Questions about tools for programming (compilers, IDE, etc.) For questions that involve programming, ask on Stack Overflow.

Questions about programming for Unix & Linux belong on Stack Overflow — this site is for users and administrators. However, questions about using and administering programming tools on Unix (setting up a development environment, configuring an IDE, compiling software, etc.) are on-topic here.

199 questions
90
votes
3 answers

How to step-into, step-over and step-out with GDB?

I typed help while I was in the GDB but didn't find anything about step-into, step-over and step-out. I put a breakpoint in an Assembly program in _start (break _start). Afterwards I typed next and it finished the debugging. I guess it was because…
Pichi Wuana
  • 1,159
  • 2
  • 9
  • 10
36
votes
5 answers

Binary compatibility between Mac OS X and Linux

We have two systems with similar hardware (main point being the processor, let us say a standard intel core 2 duo). One is running (insert your linux distro here: Ubuntu will be used henceforth), and the other is running let's say Mac OS X. One…
zec
  • 463
  • 1
  • 4
  • 5
32
votes
6 answers

Use of O_DIRECT on Linux

If this question is too programmer oriented, let me know. I wonder if there are people familiar with the O_DIRECT flag for the open() system call on Linux 2.6? Linus disparages its use, however high performance file writing seems to indicate its…
casualunixer
  • 904
  • 3
  • 11
  • 20
29
votes
3 answers

Will my linux binary work on all distros?

I found a good replacement IDE for Delphi called Lazarus. But I don't have a question for programmers. Will the statically linked Linux binary work on all Linux distributions? I.e. it does not matter on what Linux distro I built it and it will work…
Vlastimil Burián
  • 27,586
  • 56
  • 179
  • 309
26
votes
7 answers

How can I run BASIC code in a terminal?

I would like to run BASIC code, like you used to do on older computers, in Linux. (I am looking for a BASIC interpreter that can run OS functions natively) What options do I have? (Preferably for Debian-based and Arch-based)
DiamondCoderMan
  • 369
  • 1
  • 3
  • 8
25
votes
3 answers

How complex can a program be written in pure Bash?

After some very quick research, it seems Bash is a Turing-complete language. I wonder, why is Bash used almost exclusively to write relatively simple scripts? Since a Bash shell comes with Linux, you can run shell scripts without any external…
Bregalad
  • 995
  • 3
  • 10
  • 14
23
votes
6 answers

Is it possible for a program to get number of spaces between command line arguments in POSIX?

Say if I wrote a program with the following line: int main(int argc, char** argv) Now it knows what command line arguments are passed to it by checking the content of argv. Can the program detect how many spaces between arguments? Like when I type…
iBug
  • 3,428
  • 1
  • 24
  • 57
22
votes
5 answers

Is automake and autoconf the standard way to compile code?

I sometimes compile apps from source and I've either been using: ./configure make sudo make install But recently, I came across ./autogen.sh which generates the configure and make scripts for me and executes them. What other methods to streamline…
Louis Salin
  • 1,433
  • 14
  • 18
21
votes
8 answers

What are the best general purpose programming tools to complement Vim?

I've been using Vim as my text editor for a little while now and I feel like I'm taking the long way to do anything. I use ctags to tag my code base for navigation and I use grep (although inefficiently) to find where certain methods are used. But I…
Louis Salin
  • 1,433
  • 14
  • 18
18
votes
1 answer

What is AT&T’s Link Editor Command Language?

The man page for ld makes reference to AT&T’s Link Editor Command Language, however a Google search does not offer a satisfactory explanation as to what AT&T’s Link Editor Command Language is or was, other than pointing to said man pages, whereas I…
mydoghasworms
  • 1,429
  • 1
  • 13
  • 19
13
votes
5 answers

Best distro for programming

Possible Duplicate: Linux distribution geared towards developers I don't know if this question qualifies to be a question to be asked here. But can anyone tell me what's the best (linux) distro out there for programmers? I program in multiple…
Aniket Inge
  • 241
  • 1
  • 2
  • 7
12
votes
2 answers

Command-line diff tool

So we all have the diff command installed by default. I certainly don't know how to use it well. But I would expect some reasonable default usage. But when I type diff file1 file2 I get ... a text ... which I have to parse in my head ... which is…
Vorac
  • 2,957
  • 8
  • 36
  • 53
12
votes
5 answers

Is there a way for linux to pick up the phone?

I know that there is a way to make Linux dial out using a modem. Is there a way to program Linux (using a library/device) to pick up the modem (record phone calls) etc? see caller id?
user13728
12
votes
1 answer

How can I list net work devices and ipv4 address on linux without ifconfig/ip command

I already figured out that on Linux I can list network devices (cd /proc/net/dev_snmp6/ && for device in *; do echo $device; done|sort) but how can I get the ipv4 address of the device? I do not have ifconfig/ip installed - and I'd like to keep it…
Mandragor
  • 1,050
  • 3
  • 13
  • 22
12
votes
1 answer

When can I edit strings in an executable binary?

I have an executable binary; let's call it a.out. I can see the binary contains strings $ strings a.out ... /usr/share/foo .... I need to change the string /usr/share/foo to /usr/share/bar. Can I just replace the string with sed?: sed -i…
Martin Vegter
  • 69
  • 66
  • 195
  • 326
1
2 3
13 14