Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.

Questions tagged [source-code]

Filter by
Sorted by
Tagged with
15 votes
2 answers
7k views

How do I look at the source code for a command? [closed]

I suddenly decided I'd like to look at the source code for 'echo' $ which echo /usr/bin/echo so $ ls -al /usr/bin/echo -rwxr-xr-x. 1 root root 32536 Oct 31 2016 /usr/bin/echo so $strings /usr/bin/...
John Lawrence Aspden's user avatar
2 votes
2 answers
4k views

Remove comments in a C file [duplicate]

I am trying to remove comments from a file which may be in any part of a line and span multiple lines. struct my_struct{ field1; field2; /** comment 1 */ field3; /* comment 2 */ } ...
kris's user avatar
  • 209
40 votes
11 answers
39k views

Counting lines of code?

if I want to count the lines of code, the trivial thing is cat *.c *.h | wc -l But what if I have several subdirectories?
Niklas Rosencrantz's user avatar
3 votes
2 answers
3k views

Replacing backslashes with forward slash within double quotes

I have some C source code which was originally developed on Windows. Now I want to work on it in Linux. There are tons of include directives that should be changed to Linux format, e.g: #include "..\...
Dumbo's user avatar
  • 1,586
1 vote
0 answers
2k views

Install libstdc++ 4.9.x from source but compiled with glibc 2.14

I am on a Red Hat Enterprise Linux Server release 6.6 (Santiago) Linux version 2.6.32-696.20.1.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-18)...
tenticon's user avatar
  • 181
21 votes
3 answers
162k views

convert executable back to C source code

Unfortunately I lost my source code and I just have the output file that made with gcc in linux and I don’t have any access to my pc now.is there any way to convert output file to source file (in c ...
mahsa's user avatar
  • 211
10 votes
4 answers
9k views

Usage of Bang (!) in bash

I am reading the bash source code, and the BNF grammar for bash would be: <pipeline_command> ::= <pipeline> | '!' <pipeline> | <timespec&...
frams's user avatar
  • 566