Skip to main content

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

On Linux, when a shell is running a process it usually allows you to keep typing commands which will be processed when the process finishes. The same can be observed in other applications that behave ...
A_A's user avatar
  • 173
1 vote
0 answers
60 views

I am looking to run a script prior to a user being able to log in on the GUI. Its a basic script, do you accept Ts&Cs Y/N, enter user name, data is captured and stored. Then once complete takes ...
K_Sparky1029's user avatar
0 votes
0 answers
166 views

Suppose you have a kernel device driver receiving data and a user space threads waiting for the data. You want to avoid wasted cycles by having the user space thread block and wake-up once the kernel ...
FourierFlux's user avatar
0 votes
0 answers
167 views

In Geany text editor / IDE, is there a way to tell it to automatically enable line wrapping for certain file types, but not for others? For example, for .txt files, I would like it to always enable ...
Amazon Dies In Darkness's user avatar
-4 votes
1 answer
97 views

I'm confused as to why you would create a .deb package vs simply putting your program in a folder + additional files and writing an install script. What are the value of packages?
FourierFlux's user avatar
-1 votes
1 answer
83 views

I have years of experience in programming algorithms and compiling statistics. Now I would like to develop my skills and immerse myself in the world of Linux in order to get more involved with the ...
PaiThon's user avatar
  • 15
1 vote
2 answers
2k views

What I'm talking about is like in C, you get to use namespaces with the statement using namespace blah blah blah, can you do the same thing but in bash?
trent's user avatar
  • 27
0 votes
1 answer
691 views

I want to create forms in Linux. I create Windows forms, but for example if I was to use Linux to develop is there any software I could use to create a form like you would in Visual Studio?
gsmyth377's user avatar
1 vote
1 answer
250 views

I'm trying to write an IS-IS packet to gretap interface with ISO (0x00fe) protocol type. In this case there is no ethernet header so I'm using raw socket. The gretap always puts 0x6558 as the protocol ...
Barry's user avatar
  • 21
1 vote
2 answers
557 views

I linearized a fasta file using using awk on a remote computer. when I used nano to open it, it showed that the file had linearized. However when I downloaded the file to my local computer, and I ...
thole's user avatar
  • 33
0 votes
1 answer
56 views

I have a bootable kernel image, that I had created with MinGW Toolchain's that available for Microsoft Windows 11. The Project is in size tiny, but I would know: "How can I shrink the image, if ...
Jens's user avatar
  • 1
4 votes
2 answers
14k views

I'm quite a newbie when it comes to bash. I'm trying to create a script that checks whether a package is installed or not. If not it will install that package. Not sure what I'm doing tbh. #! /bin/...
Scriptkid_bash's user avatar
0 votes
2 answers
2k views

I'm starting in programming with multiple exercices and I don't know how to change my link permission (lrwxrwxrwx to lrwxr-xr-x). I have already searched solutions from Google and Youtube but nothing ...
Raph's user avatar
  • 1
0 votes
3 answers
120 views

When writing lines of code we sometimes need to consider escaping some characters. I have come across a situation that I cannot answer on my own In PHP, the exec command requires a string enclosed in ...
Luca Zappi's user avatar
0 votes
1 answer
111 views

The following is my code snippet that is producing EPROTOTYPE error, aka, Protocol Wrong Type for Socket. I checked for the headers in /usr/include in MINIX 3, sys/socket.h contains definitions for ...
Reiki Yamya's user avatar
5 votes
3 answers
1k views

I want to detect errors in application's execution logic. E.g.: forgot to call free() on address returned by malloc() did not close file handle returned by open() invalid flags passed to open() ...
zomega's user avatar
  • 1,022
1 vote
0 answers
84 views

I've played a few games in the past that had somewhat unix-like shell environments, but which were clearly missing major portions of the system because the developer had simply not bothered to ...
Hate9's user avatar
  • 21
-5 votes
1 answer
130 views

How are apps like vim and w3m built? I was trying to find info about this online but I couldn’t really find much.
noatbfgtxa's user avatar
1 vote
4 answers
178 views

Can you help me please? I have a task. I have from input some text with numbers. For example: beta 1 score 9 something 2 beta 4 something 1 I need to calculate all numbers with the same ...
lolilaliaa's user avatar
1 vote
1 answer
150 views

Mint auto-classifies applications into categories in the start menu. I use this classification to navigate apps more easily. Recently I have installed Eclipse IDE and Mint failed to classify it as &...
Aviv Aviv's user avatar
  • 131
-1 votes
3 answers
5k views

Per the fish shell documentation for the set command: append: causes the values to be appended to the current set of values for the variable. This can be used with --prepend to both append and ...
CertainPensioner's user avatar
0 votes
1 answer
175 views

i have the below condition where values are as below. emp_name="Sid" emp_id=1234 emp_hobby="" emp_likes="swimming" emp_dislikes="" emp_summary="emp_name:$...
Casata's user avatar
  • 3
0 votes
2 answers
405 views

I am new to programming in Linux and I am quite confused. I notice the lsh_ prefix is used for function names here. I'm not sure why. The only thing I can find on the internet is that lsh could ...
Tricepticon's user avatar
2 votes
1 answer
1k views

I want to write an app that shows a popup-menu after a user has selected a text in any window in Linux (debian based). Mac users may know "PopClip" (https://pilotmoon.com/popclip/) and as I ...
dirkc's user avatar
  • 31
0 votes
1 answer
928 views

I am trying to calculate multiplication of number of arguments and first argument provided by the customer. here the arguments are 10, 15 so total number of arguments is 2. Now i want the shell to ...
Nagarjuna's user avatar
1 vote
1 answer
450 views

I am writing a shell script and new to getopts for parameter parsing. What I have are 1 optional and 2 mandatory parameters and what I want to do is ensure that only one mandatory parameter is passed. ...
aika's user avatar
  • 13
1 vote
1 answer
60 views

I have infile with values for 2 variables # cat infile A 1 B 2 C D E I want to read variable a & b, so that if $b has null value, it should repeat like 1..2, till all $a values are read. so if I ...
Sollosa's user avatar
  • 2,009
2 votes
2 answers
4k views

#include <linux/io_uring.h> main.c:1:10: fatal error: linux/io_uring.h: No such file or directory #include <linux/io_uring.h> ^~~~~~~~~~~~~~~~~~ Kernel version 5.4.0-80. I ...
fullnitrous's user avatar
2 votes
1 answer
2k views

I want to re-position elements of an array (change index of array elements) based on a condition. I don't know how to translate this to jq which is more of a functional language. Basically I want to ...
Zeta.Investigator's user avatar
2 votes
2 answers
6k views

I wrote an app for Windows and macOS and I am in the process of porting it to Linux. My app has a file browser implemented and can display thumbnails or document icons of files. On Windows I get ...
HelloWorld's user avatar
0 votes
1 answer
111 views

i'm a newbie on Linux here and i was hoping to find help. I was using Centos and i've found an exercise where i have to create a script. This script should create a text file with the network ...
RedXBrain's user avatar
1 vote
2 answers
3k views

Is there any rule of thumb when the result of the program should be printed to the stdout by default, and when the more appropriate approach is to accept output file as one of the arguments and write ...
Al Bundy's user avatar
  • 201
0 votes
2 answers
161 views

I am probably making an obvious mistake but I could use a strong hint:-) for file in *; do ls $file | var=$(ls $file | grep -Eo '.{18}$' | cut -d '.' -f1 |sed 's/.\{12\}/&./'); echo "var is $...
Jeroen1000's user avatar
0 votes
1 answer
198 views

As far as I understand, an interpreter runs code line by line; but I find probable that my reasoning is incorrect. If in this example case the first if line returns true, will the program know to skip ...
Hermitao's user avatar
-3 votes
1 answer
68 views

#!/usr/bin/perl #Script:name2.pl - Demonstrates use of chop # print("Enter your name:"); $name=<STDIN>; $lname = chop($name); #Removes newline character from $name ...
Shridhar B Waghamare's user avatar
0 votes
1 answer
423 views

In Wikipedia there are two relevant articles about the term "Flip-flop": Flip-flop (electronics) Flip-flop (programming) I think that there is a formal-logic common denominator between the ...
timesharer's user avatar
0 votes
2 answers
99 views

I got a comma-separated file # cat data smartplayer,2222,off smartplayer,1111,on scorer,0000, I want to search for smartplayer in $1, get its state from $3 and print like this off-smart-player 2222 ...
Sollosa's user avatar
  • 2,009
1 vote
0 answers
113 views

I'm currently working in a project that involves the use of an ARM cortex M4 MCU, specifically STM32F429, which has an embedded LCD controller which uses the bmp image format to show the images in the ...
Alejandro Garcia Navarro's user avatar
2 votes
2 answers
5k views

I wrote my first C program which is the generic "hello world" program. Could anyone please tell me where can I find stdio.h file in my system? It will help me a lot in understanding of the ...
Ashutosh Mishra's user avatar
0 votes
1 answer
45 views

I'm trying to write a C program which can do the thing that many binaries such as package managers do in execution time. They change and add to the already outputted texts in terminal and it makes it ...
zbx0310's user avatar
  • 47
1 vote
0 answers
293 views

I would like to create a TUN interface (following this tutorial) that takes specific actions when a listening port is created on it. Those include logging the application that created the port, which ...
PoultryMan's user avatar
2 votes
1 answer
212 views

When developing a program (in C or Python, say), I often write debug messages to see whether my program behaves as intended. On Linux, such text messages can be handled in varied and flexible ways ...
Erik Aas's user avatar
  • 121
0 votes
0 answers
249 views

I think I understand what soft and hard symbolic links are, but I'm not sure how programs access them (as opposed to me, a user). For example, I want to replace my ~/.bashrc with a symbolic link that ...
Andrew Cheong's user avatar
0 votes
2 answers
7k views

Sorry about the title it may not be clear. Here is the complete explanation of my doubt. I am writing the below shell script and expecting the mentioned output. #!/bin/bash python3 print("Hello ...
Rakesh Nara 10's user avatar
1 vote
1 answer
708 views

Is there accepted "good practice" for checking that the network connection to a DNS server is operational, and that the server responds minimally, other than issuing a lookup request? ...
Mark Morgan Lloyd's user avatar
0 votes
0 answers
195 views

I am trying to create a script in which part of it runs a command that can only be stopped by the user sending SIGINT to the process. I want the user to be able to press Ctrl+C to end that part of the ...
jethr0's user avatar
  • 11
1 vote
0 answers
29 views

I could do it long way i.e cat hi.txt | grep 'important url' > imurl cat hi.txt | grep -v 'not important url' > imnoturl cat hi.txt | otherprogram1 cat hi.txt | otherprogramN However, is there ...
Machine Yadav's user avatar
0 votes
0 answers
115 views

On the understanding that PowerTools includes plantUML I've installed and enabled the package. How do I now invoke plantUML to use it? (Although I now realize that the above link is actually for ...
Nicholas Saunders's user avatar
0 votes
1 answer
186 views

I don't believe flatpak is configured: $ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux release 8.2.2004 (Core) Release: 8.2.2004 ...
Nicholas Saunders's user avatar
0 votes
0 answers
338 views

I'm currently studying Automation and Python programming. I just want to know how I would go about executing a Linux command in Python. The commands I want to execute are: install = os.system("...
Abdul Hamid's user avatar

1
2 3 4 5