Questions tagged [programming]

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

Filter by
Sorted by
Tagged with
35
votes
2answers
56k views

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 ...
17
votes
1answer
889 views

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 ...
0
votes
1answer
26 views

Bash Script Time each function and Time total Script Execution Duration

I've written a bash script and would like to implement a timer that will also get the total time of the scripts execution duration and also the time that each loop iteration takes. For example, in the ...
2
votes
1answer
938 views

VT100 terminal emulation to use with a Java-based 8-bit computer emulator

I'm successfully using GNU Screen as serial terminal to "talk" to my Altair 8800 clone (http://altairclone.com/) using serial line. The command I use is: screen -istrip /dev/ttyUSB0 Screen does the ...
0
votes
0answers
13 views

Wine has no internet connection or my app does not run

So i made a small 500 line app. When i run my.computer.network.ping ("www.google.com") or https google .com it prints the no internet connection warning that i have set up when this command fails. ...
0
votes
0answers
15 views

Kernel driver serving multiple virtual file readers

There is a kernel driver that collects data from some external hardware and passes all data to a virtual file if a reader reads this file. Data blocks are appended to a list with the assumption the ...
0
votes
1answer
826 views

distribute the JVM across a cluster of machines

Grasping at straws for search parameters and terminology. The key attribute to the JVM is the V for virtual (at least within the context of this question). How do you span a JVM across a cluster of ...
-1
votes
1answer
537 views

What is the Lua language used in Conky script? [closed]

I've been experimenting with Linux on a spare PC using Crunchbang so that I can try changing things and tinker. The Conky system monitor is fun to work with and changes are immediately seen, so it's a ...
2
votes
1answer
46 views

How to extract function comment using sed?

I want to implement a simple utility that would take a C source file and a name of a function, struct, enum or whatever and output the comment directly above the element if present. Ie. /* This is ...
16
votes
3answers
9k views

How complex can a program be written in pure Bash? [closed]

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 ...
1
vote
1answer
362 views

BASH dd problem

i am trying to learn bash and now im trying to do a script for burning isos. I made the number "4" command to make sure the variables were right. the message i get when i complete my program and ...
5
votes
11answers
17k views

Which programming language is best to begin with as a total beginner? [closed]

I have a great urge learn some coding. However I'm a bit undecided as to which programming language to begin with. Word around is Python but is it the right choice for a guy with limited knowledge in ...
0
votes
2answers
2k views

Best Distro For Artificial Intelligence Research? [closed]

Is there a definite best distro for AI research? I want to build a AI that can be used to help me manage all my emails intelligently.
-8
votes
2answers
86 views

Error Shell Programming in Linux [closed]

I need to fix my code? i=0; bil_genap=0; bil_ganjil=0; echo -n "Batas loop : "; read batas; if [ -z $batas ] | [ $batas -lt 0 ]; then echo "Ops, tidak boleh kosong atau Batas loop ...
2
votes
0answers
82 views

Good projects for bash and awk [closed]

I am learning bash and awk programming, and have gotten to the point where I want some interesting projects to work on to improve my programming. At the minute, the beginner stuff is getting too easy, ...
0
votes
1answer
2k views

Free way to get financial data as Bloomberg terminal [closed]

I was wondering if there are some free ways (applications or programming) to get financial data (either live data, historical data or both), achieving similar function as Bloomberg terminal?
2
votes
2answers
776 views

How to get a list of all installed programming languages on arch linux / any linux? [closed]

Is there a way to check what programming languages are installed on a given Linux system? For example, I have recently installed Arch Linux on my host and just for informational purposes I would like ...
1
vote
3answers
2k views

How can I make my Linux server sleep and wake on LAN when not in use?

I have recently purchased myself an HP rack server for use as a personal fileserver. This server currently lives under my bed as I have nowhere else to put it. For those not aware (as I was not ...
3
votes
2answers
2k views

Writing C# in Debian

I want to learn C# on a Debian system. What do I have to install? Is there something like an interactive prompt where I can try running snippets of code? I have to learn C# and I have a dual boot ...
6
votes
1answer
2k views

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

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 ...
5
votes
1answer
342 views

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 ... ...
0
votes
4answers
2k views

Compiling C/C++ code by way of including preprocessor build instructions in an actual C/C++ source file

I've got reasons for not wanting to rely on a specific build system. I don't mean to dis anybody's favorite, but I really just want to stick to what comes with the compiler. In this case, GCC. ...
-1
votes
1answer
59 views

How Mount a datastore on linux in python [closed]

I need to mount xyz/pqr/ datastore on my linux mychine for in my python script.
6
votes
4answers
21k views

Progressbar in bash to visualize the time to wait

In a bash script sometimes you need the user to wait some seconds for a background process to finish. I usually use for example: sleep 10 How can I add a kind of progressbar to the script, so the ...
-1
votes
1answer
159 views

What is the highest level of indentation today and has ever merged into the Linux Kernel? [closed]

I was recently reviewing the Linux kernel coding style guideline, and this got me thinking: 1) Indentation Tabs are 8 characters, and thus indentations are also 8 characters. There are heretic ...
0
votes
1answer
5k views

how to plot multiple graphs in one plot?

I want a plotting script that will plot multiple graphs on the same plot where the values of my data have the same x coordinate. This will show the differences of each variable in the plot. I tried to ...
1
vote
1answer
241 views

Can you edit address values in “/proc/$pid/mem” to reflect changes in that process?

I would like to see if I can edit a value in my program while it is running by directly changing the memory. My thought process (untested) is to do the following: Run the program. Open up "System ...
0
votes
1answer
84 views

Unix program for random image generator [closed]

I want to create a basic program in Unix that would display in HTML a random photo from a group of photos I selected and each time it is generated a different one would be displayed, hence random. ...
1
vote
1answer
106 views

Is Linux a suitable platform for learning COBOL? [closed]

I am studying a college CIS degree. Next semester, I have a choice of either studying JAVA and COBOL or JAVA and PHP. I don't know much about COBOL and only have computers with Debian. The textbooks I ...
0
votes
2answers
291 views

Is there something similar or like “pass” in python in bash/shell programming?

I sometimes need a command like pass in Python in my bash scripts. Like: if grep something then pass else code fi In Python you have: >>> for element in a: ... if not element: ...
1
vote
1answer
67 views

The $@ variable is not working in a for loop, trying to iterate through a users list

PROBLEM: I can't get the $@ variable to do what I want in a for loop, the loop only sends one name into the file while looping, it should loop through all the arguments and write them to the file ...
1
vote
2answers
499 views

checking if iptables are set on a system in script [duplicate]

I'm writing a script in bash and I need to check if iptables are set...I have this: if [ `iptables-save | grep '^\-' | wc -l` > 0 ] then echo "Iptables already set, skipping..........!" else ...
0
votes
1answer
538 views

How to pass argv arguments to a C program using a file or python script in linux?

I used to be able to pass input to C program by first writing a python script and using pipe to send it to the C program as an input or write the output of python script to a file and just doing r &...
26
votes
5answers
19k views

Binary compatibility between Mac OS X and Linux

Brace yourselves, this question will likely appear naive and/or foolish, seeing as I am relatively new to the inner workings of unix like systems, and programming in general. Ready? Ok! I will go ...
2
votes
2answers
1k views

Getting access to a variable inside a sudo clause in a script with EOF

PROBLEM: I need to have a variable here called $user: chown $user:$user "$HOME"/.bashrc but it doesn't have access to it from outside the sudo and EOF: for user in "$@" do if [ "$user" = root ]...
-2
votes
1answer
64 views

Creating shell script with bash scripting [closed]

I want to make the script to extract the users of linux server and check if "/home/$user/public_html/vb/includes/config.php" is exist , i want the script to check all the users in the server and ...
1
vote
1answer
65 views

why $($var) gives an error?

I am trying to execute the following code in shell but I am not getting the output as expected. The command is as follows: i=1 echo $($i) I am getting an error: Command not found error I think it ...
0
votes
1answer
99 views

writing to ext4, 8GB partition vs 512MB partition

I have a question which is slightly programming related, but it mostly relates to how ext4 works. I have a program which writes 128MB to a file with changing random aligned offsets. I write 256KB ...
0
votes
2answers
76 views

What OS should I use? [closed]

I recently started JAVA programming and I would like to start learning Linux programming simultaneously. I run a mac and I am planning to use Oracle VM VirtualBox to boot linux. What kind of Linux OS ...
0
votes
2answers
40 views

How to have access to script variables and environmental variables inside a sudo/EOF clause in a script…BASH

PROBLEM: I am struggling with this cp always giving errors because the variables not there... Here is my code: if [ ! -z "$USER1" ] then sudo -u "$USER1" bash <<'EOF' sleep 5 ...
2
votes
1answer
189 views

sudo -u user bash works but $HOME is not changing accordingly

I'm writing a script to setup new debian install's. The problem is in this code: if [ ! -z "$USER1" ] then sudo -u "$USER1" bash <<-EOF cp "$BASHRC $HOME"/.bashrc wget https://raw....
1
vote
0answers
54 views

Fakeroot on macOS tries to delete system directories

I’m having a problem with fakeroot on macOS. I created a pacman fork. When I’d like to delete a package, pacman tries to delete /usr/ instead of a subdirectory. On Linux, it is working fine, though. ...
1
vote
1answer
34 views

vi with files/directories on the side?

I'm wondering if there's a plugin or a way to make vi/vim have collapseable folders/files on the left side like a regular IDE.
0
votes
0answers
101 views

How to install HTML5/JavaScript to Netbeans?

I installed the NetBeans Connector plugin to Chromium on my MacBook. That worked perfectly. I could create new projects in HTML5/Javascript. I tried to do the same on my Linux Mint 18.3 computer. But ...
1
vote
1answer
97 views

LibreOffice placeholder fields documentation

I have to modify a LibreOffice template with a number of conditional statements. I managed to figure out one can add such statements through Insert > Fields > More fields, tab Functions, type ...
5
votes
4answers
18k views

How do I run .c file from the command line [duplicate]

I am beginning to work with micro controllers and programming them using C language. All my programming experience is with Python language. I know that if I want to test a script I have written in ...
22
votes
8answers
3k views

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

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 ...
22
votes
6answers
4k views

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 ...
3
votes
1answer
291 views

How to organize 3rd-party libraries for Python?

I am new in Python. I want to install many 3rd-party libraries (I think they are also called packages?) like, for example, "AstroPy". But I am not sure where the new source code will be stored (I mean,...
7
votes
2answers
3k views

Is the Unix Programmers Manual relevant for Linux?

I've been looking for an all around Linux Programmers manual but there isn't one... So that leads me to ask if the Unix Programmers Manual is relevant for Linux? The manual is here: http://cm.bell-...