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
1
vote
0answers
22 views

How to give stdout to different program on same line? [duplicate]

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 ...
0
votes
0answers
9 views

how to use plantUML after installing PowerTools?

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 ...
0
votes
0answers
12 views

What repo or remote do I need in order to install PlantUML on CentOS via flatpak?

What repo or remote do I need in order to install PlantUML on CentOS via flatpak? Umbrello looks to require a GUI: Can I use Umbrello command line features without an X server on Unix like OS ? No, ...
0
votes
1answer
15 views

How to configure flatpak on CentOS?

I don't believe flatpak is configured: [nsaunders@rolly ~]$ [nsaunders@rolly ~]$ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOS Description: CentOS Linux ...
0
votes
0answers
27 views

Execute shell commands ubuntu in Python

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("...
0
votes
1answer
33 views

How to start Jetty using start.jar from the console?

Having installed Jetty through apt how do I start the web server to get to a welcome page? Trying: java -jar /usr/share/jetty9/start.jar results in: ERROR : Nothing to start, exiting ... Usage: java ...
0
votes
0answers
12 views

mathematica in Konsole can't access last input with keyboard

Here is my configuration :-------------------:: ----------------------------- :-----------/shhOHbmp---:\ OS: Fedora 32 (Thirty Two) x86_64 /-----------omMMMNNNMMD ---: ...
0
votes
1answer
39 views

Is PackageExport a command in Linux?

Does anyone know if PackageExports is a command in Linux? or where can one install its package? When I tried to install the package SemidefiniteProgramming, to Macaulay 2, in Gnu/Linux, I always get ...
0
votes
1answer
53 views

Get current screen dimensions via Xlib using C

Is there any way to get screen dimensions of a display via Xlib using C? I've tried referring to the X.org docs (https://tronche.com/gui/x/xlib/display/screen-information.html), and it only gives me ...
0
votes
1answer
39 views

detect cms from list

my marketing department wanted from me detect our domains for that if they use Wordpress. I have our huge list of domains, but I can't find proper cms detector which will just save which domain has ...
0
votes
1answer
16 views

Multiple tcp scanning tools integration

I recently started my first programming project that consist of purpose multiple tcp scanning tools integration for multiple usage. To be more clear, I want to incorporate NMAP and MASSCAN tools. But, ...
0
votes
1answer
36 views

Which programming lang.s are used for ui of os? [closed]

Which programming languages are used for the part of the os which user interacts with (the application?), for instance the task bar (on linux ,macosx or windows), start button, desktop etc. ?
0
votes
1answer
403 views

Simple shell loop fail in Makefile

Why does the shell loop l='abc de f'; for k in $l ;{ echo $k; } inside Makefile not work ? instead only give abc de f at once How to solve such in the definitive way?
-1
votes
1answer
65 views

Replace numbers in one file with names from another file

I have a file where numbers correspond to names. I need to make changes in the second file such that the numbers are replaced by names Example in 1st file 1 K 2 J........ Second file 1 2 3 4 I ...
0
votes
1answer
384 views

How to exit from an external program with a bash script?

Im working within an external program and I need to exit the program from a bash script that I will produce on the fly. So, in the external environment if I do exit it exits. Although if I do, ...
1
vote
1answer
120 views

How do I pass commands to an external command, from bash?

I would like know if it is possible to enter in an external program and give commands from a bash script. As an example, lets imagine the external program is ipython and I want to give the commands ...
0
votes
0answers
19 views

Why a result from history command doesn't behave in a bash function? [duplicate]

I started learning bash script recently, and I got stuck with this situation. I want to use a result from history command for some purpose. First, I tried to extract the 2nd column (command name) ...
0
votes
0answers
36 views

AVRPROG Don't recognize my avr programmer( myAVR mySmartUSB light)

I need to install one avr programmer ( myAVR mySmartUSB light)) like this : into my linux OS, so i tried to install it via Eclipse by this instructions,when i run sudo avrprog i get this output : ...
0
votes
1answer
52 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 ...
3
votes
1answer
97 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 ...
-9
votes
2answers
102 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
147 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, ...
6
votes
1answer
1k 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 ... ...
-1
votes
1answer
346 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 ...
1
vote
1answer
517 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 ...
1
vote
1answer
258 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
838 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
98 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
1k 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
964 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 &...
2
votes
2answers
2k 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 ]...
1
vote
1answer
82 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
2answers
52 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
242 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
85 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
36 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
150 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
207 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
30k 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 ...
23
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
388 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,...
2
votes
3answers
3k 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 ...
-2
votes
1answer
55 views

Remove the gap pattern from files [closed]

I want to remove gaps (-). if gap found continuous >10 in all >Tem at the same position then remove the all gaps and also remove the sequences or gap from the query at the same position which are in ...
4
votes
2answers
3k 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 ...
0
votes
1answer
72 views

How to output the display from an application to a vnc viewer? [closed]

How to I write a program on a machine with a high end graphics card and a desired platform so that other computers on a network can view the video output of the program on a separate monitor? Like ...
1
vote
2answers
12k views

sh: 1: program not found

I have written a script to execute files one by one by calling a installed program. The same program is executing from terminal, like procheck abc.pdb, then it's working fine. But when I execute this ...
1
vote
0answers
428 views

how to get dark theme or look for netbeans?

Not quite sure how to get dark themes for Netbeans: would like something similar to this look: just without the "side" window.
0
votes
2answers
85 views

netbeans has preview tile or window — how to remove that preview?

How I get the "preview" window on the far right hand side to minimize or disappear? so that the class extends fully to the right hand side.
0
votes
1answer
25 views

Having multiple computers on network access file?

Say I have a program being run on multiple computers all on the same network (and all on the same account). Every once in a while the program needs to read/write a file save.dat. The actual file ...
1
vote
0answers
823 views

High iowait while the throughput and IOPS are low

I'm new to programming & Linux. After I finished my programs(do some IO), I found iowait is very high(~65%) while the throughput(~5M/s read + ~5M/s write) and IOPS(50~100 QPS) are low. iostat -...